Yes, it’s another logging api… why you ask?
I believe logging is one of the most important things you do to quickly identify problems. Unfortunatly to maintain runtime performance, most of us either turn it off in production by using System.Diagnostics.Debug methods, or we are forced to use an addition library. As I said some time ago I recently had the *pleasure* of detail-diving in the standard .Net logging platform, log4net. Much to my dissatisfaction, it lived up to most other open source projects. Much like NUnit and CruiseControl it is over engineered, over complicated, and over costly in performance. With new-found knowledge of what not to do, I set out to write my own with the following goals:
- Simple and Easy — Both logging and configuration routines should be simple and self explanatory and provide all that is needed to get the job done in one static class API.
- Easy to Replace API — If needed I want to be able to remove it from my code without any work so I chose not to use a namespace and to just call a single static class named ‘Log’. This allows me to at any time replace the implementation by simply referencing a different assembly.
- Simple Implementation — just handle the basics and don’t blow up. Logging should not be a mastermind effort in over engineering, keep it simple.
- Extensivly Tested and Robust – Acceptance criteria is > 90% statement level test coverage.
- Fast when Needed — There should be a minimal cost involved in using.
- Source Code:
- Test Coverage:
- Test Code: