${date} and ${longdate} logged with empty dates

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

${date} and ${longdate} logged with empty dates

Paul
I have an issue with version 2.0 whereby logs with a date in the layout are formatted with empty dates

e.g. 1-01-01 00:00:00.0000

I haven't seen anything in the documentation that would cause this. I've also rolled back to 1.0.0.505 and the same thing happens.

Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: ${date} and ${longdate} logged with empty dates

new2nlog
I had the same problem, but figured out that the timestamp is not set by default (but left to its default) when using LogeventInfo to log :
nlogger.Log(myLogEventInfo)
So I had to explicitly set the timeStamp, which I would liked to have it done automatically by NLog

Hope this will help