Source Code (v 0.0.2)

Rating:        Based on 1 rating
Reviewed:  1 review
Downloads: 541
Released: Sep 18, 2008
Updated: Sep 18, 2008 by dotnetrodent
Dev status: -not yet defined by owner-

Recommended Download

Source Code SPlog4net 0.0.2 Source
source code, 9K, uploaded Sep 18, 2008 - 541 downloads

Release Notes

Fixed:
1. The UlsLogAppender wrote to the TraceProvider the value of LoggingEvent.RenderedMessage. This was incorrect, as, for example, in case of logger.Error(msg, exception) calls it contained only the msg part, omitting the exception. Now it writes the value of the call to RenderLoggingEvent(loggingEvent).
2. At fmorriso's suggestion (thanks!), the TraceProvider class doesn't call Debug.Assert anymore, but instead returns true or false from methods such as RegisterTraceProvider and UnregisterTraceProvider. The UlsLogAppender has also been modified to take the result into account.


Usage:

1. In the LoggerWrapper class, change the value of the LoggerMessagePrefix variable to a prefix of your choice. All messages logged with the logger will be prefixed with this string. Useful if you want to use a utility like SPTraceView and filter out other messages.
2. Build.
3. Use (don't forget to configure your application for log4net, that is .config file and maybe XmlConfigurator attribute ;))

Reviews for this release

     
I don't know why it took me so long to find this project, but I've been using log4net with SharePoint for over a year. I was going to start my own custom logger, but this works perfectly for my SharePoint logging. Thanks!
by ejwettstein on Sep 14, 2009 at 3:55 PM