I have an application which logs to log4net but also uses Nhibernate. My app configures both Nhibernate (using Fluent Nhibernate config) and log4Net (using BasicConfigurator) programmatically .
Problem is my logs are full of Nhibernate log info which I don't need 99.9% of the time and the app slows down due to the full logging from Nhibernate.
How can I configure Nihbernate to not do any logging or log4Net to ignore all Nhibernate loggers programmatically? I know you can do it using xml config files but this is not an option for me.
Any help would be much appreciated.
See Log4Net: Programmatically specify multiple loggers (with multiple file appenders) where I stole this from: