Click or drag to resize

W3CExtendedLogLayout Class

A specialized layout that renders W3C Extended Log Format (ELF).
Inheritance Hierarchy
SystemObject
  NLog.LayoutsLayout
    NLog.LayoutsLayoutWithHeaderAndFooter
      NLog.Web.LayoutsW3CExtendedLogLayout

Namespace:  NLog.Web.Layouts
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 W3CExtendedLogLayout : LayoutWithHeaderAndFooter

The W3CExtendedLogLayout type exposes the following members.

Constructors
  NameDescription
Public methodW3CExtendedLogLayout
Initializes a new instance of the W3CExtendedLogLayout class.
Top
Properties
  NameDescription
Public propertyDirectives
Gets the array of directive headers to include
Public propertyFields
Gets the array of extended fields to include
Public propertyFooter
Gets or sets the footer layout.
(Inherited from LayoutWithHeaderAndFooter.)
Public propertyHeader
Gets or sets the header layout.
(Inherited from LayoutWithHeaderAndFooter.)
Public propertyLayout
Gets or sets the body layout (can be repeated multiple times).
(Inherited from LayoutWithHeaderAndFooter.)
Public propertyLineEnding
Newline to append after each directive header
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from Layout.)
Top
Methods
  NameDescription
Protected methodCloseLayout
Closes the layout.
(Inherited from Layout.)
Protected methodGetFormattedMessage
Renders formatted output using the log event as context.
(Inherited from LayoutWithHeaderAndFooter.)
Protected methodInitializeLayout
Initializes the layout.
(Overrides LayoutInitializeLayout.)
Public methodPrecalculate
Precalculates the layout for the specified log event and stores the result in per-log event cache. Only if the layout doesn't have [ThreadAgnostic] and doesn't contain layouts with [ThreadAgnostic].
(Inherited from Layout.)
Public methodRender(LogEventInfo)
Renders formatted output using the log event as context.
(Inherited from Layout.)
Public methodRender(LogEventInfo, StringBuilder)
Optimized version of Render(LogEventInfo) that works best when override of RenderFormattedMessage(LogEventInfo, StringBuilder) is available.
(Inherited from Layout.)
Protected methodRenderFormattedMessage
Renders formatted output using the log event as context.
(Overrides LayoutWithHeaderAndFooterRenderFormattedMessage(LogEventInfo, StringBuilder).)
Protected methodResolveServiceT
Resolve from DI ServiceRepository
(Inherited from Layout.)
Top
See Also