-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Log4JXMLEvent Layout Renderer
XML event description compatible with log4j, Chainsaw and NLogViewer.
Platforms Supported: All
Notice that Chainsaw-target works as a combined solution for sending Log4j-XML events over TCP / UDP / HTTP.
${log4jxmlevent:includeEventProperties=Boolean:includeSourceInfo=Boolean:includeCallSite=Boolean
:includeNdc=Boolean:ndcItemSeparator=String:appInfo=String:indentXml=Boolean}
-
appInfo - AppInfo field. By default it's the friendly name of the current AppDomain.
-
loggerName - Logger field. By default it's the output of
${logger}
Introduced in NLog 4.5
-
formattedMessage - Message field. By default it's the output of
${message}
Introduced in NLog 5.3
-
includeSourceInfo - Indicates whether to include source info (file name and line number) in the information sent over the network. Boolean
-
includeCallSite - Indicates whether to include call site (class and method name) in the information sent over the network. Boolean
-
IncludeEventProperties - Include all events properties of a logevent? Default:
true
.Before NLog 5.0 option was named IncludeAllProperties with Default:
false
-
IncludeScopeProperties - Indicates whether to include ScopeContext Properties dictionary. Default:
false
.Before NLog 5.0 option was named IncludeMdlc or IncludeMdc
-
IncludeScopeNested - Indicates whether to include ScopeContext Nested Stack as NDC. Default:
false
.Before NLog 5.0 option was named IncludeNdlc
-
ScopeNestedSeparator - NDC item separator. Default:
Before NLog 5.0 option was named NdlcItemSeparator
-
includeNdc - Indicates whether to include ScopeContext Nested Stack. Default:
false
. -
ndcItemSeparator - NDC item separator. Default:
-
WriteThrowableCData - Write Exception as CDATA in log4j:throwable xml-element (Not supported by all viewers). Default: false
Introduced in NLog 5.0
-
indentXml - Indicates whether to enable XmlWriterSettings.Indent for XML indentation. Default:
false
. -
includeNLogData - Indicates whether to include NLog-specific extensions to log4j schema. Default:
false
.Before NLog 5.0 option had Default:
true
.
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json