<PackageReference Include="NLog" Version="6.2.0" />

NLog.Layouts.XmlElementBase

public abstract class XmlElementBase : Layout
A specialized layout that renders XML-formatted events.
public IList<XmlAttribute> Attributes { get; }

Gets the array of 'attributes' configurations for the element

Gets the collection of context properties that should be included with the other properties.

public IList<XmlElement> Elements { get; }

Gets the array of xml 'elements' configurations.

public ISet<string> ExcludeProperties { get; set; }

List of property names to exclude when IncludeEventProperties is true

public bool IncludeAllProperties { get; set; }

Obsolete and replaced by IncludeEventProperties with NLog v5. Gets or sets the option to include all properties from the log event (as XML)

public bool IncludeEmptyValue { get; set; }

Gets or sets whether empty XML-element should be included in the output.

public bool IncludeEventProperties { get; set; }

Gets or sets whether to include the contents of the Properties dictionary.

public bool IncludeMdc { get; set; }

Obsolete and replaced by IncludeScopeProperties with NLog v5. Gets or sets a value indicating whether to include contents of the MappedDiagnosticsContext dictionary.

public bool IncludeMdlc { get; set; }

Obsolete and replaced by IncludeScopeProperties with NLog v5. Gets or sets a value indicating whether to include contents of the MappedDiagnosticsLogicalContext dictionary.

public bool IncludeScopeProperties { get; set; }

Gets or sets whether to include the contents of the ScopeContext properties-dictionary.

public bool IndentXml { get; set; }

Auto indent and create new lines

public int MaxRecursionLimit { get; set; }

How far should the XML serializer follow object references before backing off

public string PropertiesCollectionItemName { get; set; }

XML element name to use for rendering IList-collections items

public string PropertiesElementKeyAttribute { get; set; }

XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included

public string PropertiesElementName { get; set; }

XML element name to use when rendering properties

public string PropertiesElementValueAttribute { get; set; }

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.

protected XmlElementBase(string elementName, Layout elementValue)

Initializes a new instance of the XmlElementBase class.