You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Gourlay, Colin" <cg...@ebs.hw.ac.uk> on 2008/05/30 14:11:59 UTC

Filter NHibernate logging

Hello

Is it possible to filter out the NHibernate logs from my application logs via the XML config file.

The logging is working great but I am finding that the inclusion of the NHibernate logs is way to verbose for my needs and that the information I am really interested in is being 'lost' (or rather harder to find) in the amount of information being logged.

If anyone can point me in the right direction I would be very grateful.

Thanks

Colin

________________________________

Edinburgh Business School is a Charity Registered in Scotland, SC026900

RE: Filter NHibernate logging

Posted by Rob Prouse <Ro...@Ivara.com>.
Are all of your log names based on namespaces that all derive from a minimal number of root namespaces such as your company name? If so, don't set up a root logger, just set up loggers for those root namespaces.

Another option is to add a LoggerMatchFilter to your appenders. That filter should match NHibernate and set AcceptOnMatch to false. This should filter out the NHibernate namespace.

Rob Prouse

From: Gourlay, Colin [mailto:cg1@ebs.hw.ac.uk]
Sent: May-30-08 8:12 AM
To: log4net-user@logging.apache.org
Subject: Filter NHibernate logging

Hello

Is it possible to filter out the NHibernate logs from my application logs via the XML config file.

The logging is working great but I am finding that the inclusion of the NHibernate logs is way to verbose for my needs and that the information I am really interested in is being 'lost' (or rather harder to find) in the amount of information being logged.

If anyone can point me in the right direction I would be very grateful.

Thanks

Colin

________________________________

Edinburgh Business School is a Charity Registered in Scotland, SC026900