Click or drag to resize
Log4JXmlEventLayout Class
A specialized layout that renders Log4j-compatible XML events.
Inheritance Hierarchy

Namespace: NLog.Layouts
Assembly: NLog (in NLog.dll) Version: 4.3.0
Syntax
public class Log4JXmlEventLayout : Layout

The Log4JXmlEventLayout type exposes the following members.

Constructors
  NameDescription
Public methodLog4JXmlEventLayout
Initializes a new instance of the Log4JXmlEventLayout class.
Top
Properties
  NameDescription
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from Layout.)
Public propertyRenderer
Gets the Log4JXmlEventLayoutRenderer instance that renders log events.
Top
Methods
  NameDescription
Protected methodCloseLayout
Closes the layout.
(Inherited from Layout.)
Protected methodGetFormattedMessage
Renders the layout for the specified logging event by invoking layout renderers.
(Overrides LayoutGetFormattedMessage(LogEventInfo).)
Protected methodInitializeLayout
Initializes the layout.
(Inherited from Layout.)
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 doens't contain layouts with [ThreadAgnostic].
(Inherited from Layout.)
Public methodRender
Renders the event info in layout.
(Inherited from Layout.)
Top
Remarks
This layout is not meant to be used explicitly. Instead you can use ${log4jxmlevent} layout renderer.
See Also