A logger is a very useful tool when developing a (web)application, especially when you’re using an object-relation mapping solution such as NHibernate or Entity Framework. In order to improve the performance of your application it is useful to analyze the SQL queries and other information (e.g. warnings, errors, caching) about the object-relation mapping.
Since NHibernate 3 it is possible to implement a custom logger. Log4net is not necessary anymore. In this post I’ll describe how to implement your own logger.