Menu

#35 Patch: NLog 2.0 support

v2.0
open
nobody
5
2011-07-27
2011-07-27
Johnny G
No

This patch adds NLog 2.0 support in a Common.Logging.NLog20 project. NLog 2.0.0.2000 was just officially released a week or two ago.

The NLog binaries are not included and will need to be downloaded from http://nlog.codeplex.com/releases/32639/download/259966. Place NLog.dll in /lib/NLog20/net/2.0.

Due to differences in StackTrace handing between NLog 1 and 2, a couple questionable bits of code were needed to a) detect when the stack trace renderer is used and b) if used, set the user stack frame correctly. I couldn't think of a better way to implement it, but perhaps someone on the netcommon team can.

To apply the patch, use the following command in the trunk:

patch -p1 -u -i add-nlog2.patch

I haven't attempted this with TortoiseSVN. If you are unable to patch the trunk for some reason, you can clone my Github mirror which includes all the patched changes: https://github.com/jgoz/netcommon-logging

If you have any questions, please let me know.

Discussion

  • Johnny G

    Johnny G - 2011-07-27

    Patch to add NLog 2.0 support. Binaries not included.

     
  • Stephen Bohlen

    Stephen Bohlen - 2011-07-27

    Thanks very much for taking the time to submit this patch -- we will review it and (hopefully!) apply it to the trunk soon, taking care to ensure that the stack trace handling is given special attention.

     
  • Johnny G

    Johnny G - 2011-09-19

    Has anyone has had time to review this patch? NLog2 has some nice improvements over NLog1 and it would be great if CommonLogging supported it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.