Hello,
As the title says, I'm going from log4net to NLOG.
Everything configured successfully but got problems with pattern layout.
log4net pattern layout
xaml
%8level| %8timestamp| %5.5thread| %10.20logger{1}| %message%newline
How do I write this pattern layout in nlog?
Currently Getting problems with empty spaces and also cannot find timestamp pattern.
The simple conversion would be this:
${level}|${longdate}|${threadid}|${logger}|${message}${exception:format=tostring}
If you want the padding:
${level:padding=5}| ${time:invariant=true}| ${threadid:padding=5}| ${logger}| ${message}${exception:format=tostring}
Hi!
I could recommended to read:
And (searchable) list of all options: https://nlog-project.org/config/?tab=layout-renderers
Thank you
Most helpful comment
The simple conversion would be this:
If you want the padding: