Pattern not applied for log file

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

Pattern not applied for log file

Vlad
Hello!
I have a problem with reading NLog log file.
Next line (as example) not handler correct:
2016-07-07 14:06:47.3007|********.LoadStructure.DoCreateUpdateAttributes|Warn|Update attribute  "****" of entity "******"; 1 of 12; Entity #3 of 62|System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Relationship name is required when attribute id is not specified.

I'm using a pattern:
%d|%C|%level|%m|%exception

In any way, %d|%m - not works too.

How could I parse my log?
Reply | Threaded
Open this post in threaded view
|

Re: Pattern not applied for log file

Philipp Lauchner
Administrator
Dear Vlad,

as you are reading an NLog file, please do not use a log4net pattern but use Nlog layout renderers (see https://github.com/nlog/nlog/wiki/Layout-Renderers).
Please note that the expression builder in the file receiver window currently only supports log4net patterns.

Your working Nlog pattern is
${date:format=yyyy-MM-dd HH\:mm\:ss.ffff}|${callsite}|${level}|${message}|${exception}




Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support