log4jxmlevent

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

log4jxmlevent

tnesser
I've tried to generate a XML output using the logjxmlevent, nlog.config:
<target name ="xmlFile" xsi:type="File"
      fileName="${basedir}/logg/log.xml"
      archiveFileName="${basedir}/logg/arkiv/log_{#####}.xml"
      archiveAboveSize="10000000"
      layout="${log4jxmlevent:includeSourceInfo=true:includeCallSite=true:appInfo=true:includeNDC=true:includeNLogData=true}"/>

It's almost working. But the xml file is missing end tags:
<log4j:event logger="KPD" level="ERROR" timestamp="1326718330351" thread="13"><log4j:message>Test message</log4j:message><log4j:NDC />

shouldn't it be a </log4j:event> at the end of each log statement?

regards
Thomas
Reply | Threaded
Open this post in threaded view
|

Re: log4jxmlevent

tnesser
Ok, read another post her with the same problem, seems that includeSourceInfo=true:includeCallSite=true throws an exception, so changed the layout to:

layout="${log4jxmlevent:includeSourceInfo=false:includeCallSite=false:appInfo=true:includeNDC=true:includeNLogData=true}"/>

Thomas