A specialized layout that renders Log4j-compatible XML events.
Platforms Supported: All - Requires nuget-package NLog.Targets.Network since NLog v6
Notice that Log4JXml-target works as a combined solution for sending Log4j-XML events over TCP / UDP / HTTP.
<targets> <target xsi:type="SomeTarget"> <layout xsi:type="Log4JXmlEventLayout" includeEventProperties="true"> <parameter name="processId" value="${processid}" /> <!-- Repeated --> </layout> </target> </targets>
appInfo - AppInfo field. By default it's the friendly name of the current AppDomain.
Introduced in NLog 5.0
loggerName - Logger field. By default it's the output of ${logger}
Introduced in NLog 5.0
formattedMessage - Message field. By default it's the output of ${message}
Introduced in NLog 5.3
IncludeEventProperties - Include all events properties of a logevent as log4j:data
? Default: true
.
Before NLog 5.0 option was named IncludeAllProperties with Default:
false
IncludeScopeProperties - Indicates whether to include ScopeContext Properties as log4j:data
. 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:
includeSourceInfo - Indicates whether to include source info (file name and line number). Default: false
.
Introduced in NLog 4.6.5
includeCallSite - Indicates whether to include call site (class and method name). Default: false
.
Introduced in NLog 4.6.5
includeNLogData - Indicates whether to include NLog-specific extensions to log4j schema. Default: false
.
Before NLog 5.0 option had Default:
true
.
WriteThrowableCData - Write Exception as CDATA in log4j:throwable xml-element (Not supported by all viewers). Default: false
.
Introduced in NLog 5.0
parameter - Additional context properties that should be included as log4j:data
Introduced in NLog 4.6.4
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4