Click or drag to resize

AspNetRequestHeadersLayoutRenderer Class

ASP.NET Request Headers
Inheritance Hierarchy
SystemObject
  NLog.LayoutRenderersLayoutRenderer
    NLog.Web.LayoutRenderersAspNetLayoutRendererBase
      NLog.Web.LayoutRenderersAspNetLayoutMultiValueRendererBase
        NLog.Web.LayoutRenderersAspNetRequestHeadersLayoutRenderer

Namespace:  NLog.Web.LayoutRenderers
Assemblies:   NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
  NLog.Web (in NLog.Web.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax
public class AspNetRequestHeadersLayoutRenderer : AspNetLayoutMultiValueRendererBase

The AspNetRequestHeadersLayoutRenderer type exposes the following members.

Constructors
  NameDescription
Public methodAspNetRequestHeadersLayoutRenderer
Initializes a new instance of the AspNetRequestHeadersLayoutRenderer class.
Top
Properties
  NameDescription
Public propertyExclude
Gets or sets the keys to exclude from the output. If omitted, none are excluded.
Public propertyHeaderNames Obsolete.
Header names to be rendered. If null or empty array, all headers will be rendered.
Public propertyHttpContextAccessor
Provides access to the current request HttpContext.
(Inherited from AspNetLayoutRendererBase.)
Public propertyItems
Header names to be rendered. If null or empty array, all headers will be rendered.
Public propertyItemSeparator
Separator between key/value pair, and the next pair. Only used for Flat
(Inherited from AspNetLayoutMultiValueRendererBase.)
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from LayoutRenderer.)
Public propertyLowerCaseKeys
Convert the key to lowercase if true, otherwise render the raw value of key. Default is false.
(Inherited from AspNetLayoutMultiValueRendererBase.)
Public propertyOutputFormat
Determines how the output is rendered. Possible Value: FLAT, JSON. Default is FLAT.
(Inherited from AspNetLayoutMultiValueRendererBase.)
Public propertySingleAsArray Obsolete.
Get or set whether single key/value-pair be rendered as Json-Array.
(Inherited from AspNetLayoutMultiValueRendererBase.)
Protected propertyValueFormatter
Value formatter
(Inherited from LayoutRenderer.)
Public propertyValueSeparator
Separator between value and key. Only used for Flat
(Inherited from AspNetLayoutMultiValueRendererBase.)
Public propertyValuesOnly
Only render values if true, otherwise render key/value pairs.
(Inherited from AspNetLayoutMultiValueRendererBase.)
Top
Methods
  NameDescription
Protected methodAppend
Validates that the HttpContext is available and delegates append to subclasses.StringBuilder.
(Inherited from AspNetLayoutRendererBase.)
Protected methodCloseLayoutRenderer
Closes the layout renderer.
(Inherited from AspNetLayoutRendererBase.)
Protected methodDoAppend
Renders the value of layout renderer in the context of the specified log event into StringBuilder.
(Overrides AspNetLayoutRendererBaseDoAppend(StringBuilder, LogEventInfo).)
Protected methodGetCulture
Get the CultureInfo for rendering the messages to a String
(Inherited from LayoutRenderer.)
Protected methodGetFormatProvider
Get the IFormatProvider for rendering the messages to a String
(Inherited from LayoutRenderer.)
Protected methodGetRenderedItemSeparator
Get the rendered ItemSeparator
(Inherited from AspNetLayoutMultiValueRendererBase.)
Protected methodGetRenderedValueSeparator
Get the rendered ValueSeparator
(Inherited from AspNetLayoutMultiValueRendererBase.)
Protected methodInitializeLayoutRenderer
Initializes the layout renderer.
(Inherited from LayoutRenderer.)
Public methodRender
Renders the value of layout renderer in the context of the specified log event.
(Inherited from LayoutRenderer.)
Protected methodResolveServiceT
Resolves the interface service-type from the service-repository
(Inherited from LayoutRenderer.)
Protected methodSerializePairs
Serialize multiple key/value pairs
(Inherited from AspNetLayoutMultiValueRendererBase.)
Protected methodSerializeValues
Serialize multiple values
(Inherited from AspNetLayoutMultiValueRendererBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from LayoutRenderer.)
Top
Remarks
1${aspnet-request-headers:OutputFormat=Flat}
2${aspnet-request-headers:OutputFormat=JsonArray}
3${aspnet-request-headers:OutputFormat=JsonDictionary}
4${aspnet-request-headers:OutputFormat=JsonDictionary:Items=username}
5${aspnet-request-headers:OutputFormat=JsonDictionary:Exclude=access_token}
See Also