Click or drag to resize

XmlElementBase Class

A specialized layout that renders XML-formatted events.
Inheritance Hierarchy
SystemObject
  NLog.LayoutsLayout
    NLog.LayoutsXmlElementBase
      NLog.LayoutsXmlElement
      NLog.LayoutsXmlLayout

Namespace:  NLog.Layouts
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public abstract class XmlElementBase : Layout

The XmlElementBase type exposes the following members.

Constructors
  NameDescription
Protected methodXmlElementBase
Initializes a new instance of the XmlElementBase class.
Top
Properties
  NameDescription
Public propertyAttributes
Gets the array of 'attributes' configurations for the element
Public propertyContextProperties
Gets the collection of context properties that should be included with the other properties.
Public propertyElements
Gets the array of xml 'elements' configurations.
Public propertyExcludeProperties
List of property names to exclude when IncludeEventProperties is
Public propertyIncludeEmptyValue
Gets or sets whether empty XML-element should be included in the output.
Public propertyIncludeEventProperties
Gets or sets the option to include all properties from the log event (as XML)
Public propertyIncludeScopeProperties
Gets or sets whether to include the contents of the ScopeContext dictionary.
Public propertyIndentXml
Auto indent and create new lines
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from Layout.)
Public propertyMaxRecursionLimit
How far should the XML serializer follow object references before backing off
Public propertyPropertiesCollectionItemName
XML element name to use for rendering IList-collections items
Public propertyPropertiesElementKeyAttribute
XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included
Public propertyPropertiesElementName
XML element name to use when rendering properties
Public propertyPropertiesElementValueAttribute
XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value.
Top
Methods
  NameDescription
Protected methodCloseLayout
Closes the layout.
(Overrides LayoutCloseLayout.)
Protected methodGetFormattedMessage
Renders formatted output using the log event as context.
(Overrides LayoutGetFormattedMessage(LogEventInfo).)
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. Skips context capture when Layout have [ThreadAgnostic], and only contains 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 LayoutRenderFormattedMessage(LogEventInfo, StringBuilder).)
Protected methodResolveServiceT
Resolve from DI ServiceRepository
(Inherited from Layout.)
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Remarks
See Also