I’ve only recently found out about Common Logging and I decided to implement it in a helper library that I use instead of a straight up NLog implementation. In theory this will allow me to import my helper library into any project and then seamlessly inject any log messages that are generated by the helper library into the logs of the application. The best part is, of course, that Common.Logging doesn’t care what kind of logger the application ends up using as long as there is a Common.Logging wrapper for that logger. Oh the magic of interfaces!
Although most loggers are supported by the latest Common.Logging releases, Sitecore.Logging isn’t. Sitecore.Logging is actually log4net v184.108.40.206714 aka Beta 8. The earliest version of log4net that is readily supported by Common.Logging is 1.2.11. Luckily, implementing the wrapper was pretty straight forward and I decided to make a NuGet package out of it.