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.
Patch to add NLog 2.0 support. Binaries not included.
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.
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.