This project has moved and is read-only. For the latest updates, please go here.

Contextual Logging Support

Aug 19, 2010 at 9:30 AM
Hi, I've uploaded a patch which adds message indenting my context depth. A feature that I find useful. The feature is off by default and enable from the settings dialog. What is does is indents each message by the logger's depth (or context depth). If logging using the class's namespace then this may not be of interest. But if your using what I call 'Contextual Logging' then it makes the log much more readable. Context logging is were the loggers are organised by object use rather that object's type namespace. Use is a run-time thing. For example you may have a type 'Company' and another type 'Person'. If logging using the type's namespace then you probably find the log message includes information like company and person's name. With context logging the loggers are names by application context so the may be loggers like 'MyApp.Contacts.AcmeCorporation.SimonSmith' and 'MyApp.Contacts.RoadRunnerTrainingInc.JohnSmith'. In this case the indenting by context depth makes the log so much more readable. Offered just in case anybody finds it useful. Rob Smyth
Dec 12, 2010 at 8:52 AM


I'm interested in using Contextual logging - makes it much easier to follow the flow of code.

Is Contextual Logging Support in the latest build - can't see any options, and will it work with Log4Net?