Just recently got into experimenting with NLog, and it occurs to me that I would like to be able to add header information to the top a log file such as:
Exe
Just happened to stumble on this while looking at replicating a header/footer in a log one of my co-workers created with log4net. I found this from some open-source project and adapted it as an internal example. I think it should be simple to modify for your needs.
It gives me output that looks like this:
----------NLog Demo Starting---------
2013-03-01 16:40:19.5404|INFO|Project.Form1|Sample informational message
2013-03-01 16:40:19.5714|WARN|Project.Form1|Sample warning message
2013-03-01 16:40:19.5714|ERROR|Project.Form1|Sample error message
2013-03-01 16:40:19.5714|FATAL|Project.Form1|Sample fatal error message
----------NLog Demo Ending-----------
I have no idea why this seems to be undocumented. The only reference I could find was here: https://github.com/nlog/NLog/wiki/LayoutWithHeaderAndFooter
-Jody