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 Mario Gutierrez <mg...@firstam.com> on 2004/09/08 19:49:22 UTC

Programmatically disable logging

I'm creating a custom database appender. Since our log messages
sometimes exceed the max size of varchar columns, I'm intercepting the
large messages and persisting them to a file replacing the message with
the file path. Unfortunately, all of our common assemblies such as data
access and file writing use log4net. So, whenever I use our data access
layer (DAL) within the database appender, the DAL itself generates
logging which in turn calls the database appender. It's an infinite
loop. I'd like to programmatically disable all logging within the
appender. Is there an efficient way to do this?