I believe the proper way to do this is to add a filter to each appender to filter based on level, and then attach both appenders to the root logger

http://logging.apache.org/log4net/release/manual/configuration.html#filters

<root>
    <level value="ALL" />
    <appender-ref ref="FileAppender" />
    <appender-ref ref="DBAppender" />
</root>

On 4/6/06, Saurabh Dani <[EMAIL PROTECTED]> wrote:

Greetings All,

Is it possible to write to more than one appenders? In the FAQs I read that it is possible to do so, but could not find an example.

I would like to write the debug logs to a fileappender (if debug logging is turned on), and info logs to a database. Is this possible with log4net?

Thanks
Saurabh


Reply via email to