Thursday, February 6, 2014

.NET low latency logging. Part 6 - Common.Logging abstraction


Common.Logging is a logging facade that provides similar interface for creating loggers and perform logging operations in a unified way. It could be configured to use log4net, NLog, Enterprise Library 3.1 Logging Adapter as a back-end loggers. The question is how Common.Logging facade influence on the final logging performance? I'll test Common.Logging over log4net for different appenders - NullAppender, FileAppender, RollingFileAppender.

Add Common.Logging to the sample application

It is very simple to integrate Common.Logging into the sample application. Just add Common.Logging and log4net packages (current version is 1.2.13) with a NuGet to the project. Add to the project log4net.config file:
Initialize logging manager and create a logger in code:

Performance influence of the Common.Logging


No comments:

Post a Comment