I might be wrong but I think you'll find that for your configuration you
actually have three loggers for foo.bar:

root => logging to FileAppender at the DEBUG level
foo => logging nowhere
foo.bar => logging to EventLogAppender at the WARN level

so in this case WARNs will go to two places. You might try to set:

additivity="false"

on your foo.bar logger to prevent it from inheriting appenders from both foo
and root. Again I might be wrong, but that's how additivity works as I
understand it.


Wayne M. Bradney 
Application Architect, Derivatives & Structured Products 
Wall Street Systems 
30 Broad Street, 24th Floor, New York, NY 10004 USA 
Tel: +1 (212) 809 7200 
Fax: +1 (212) 809 7578 
Visit our website at http://www.wallstreetsystems.com 
This transmission may be a privileged or confidential communication. If you
are not the intended recipient, you are hereby notified that you have
received this transmission in error; any review, dissemination, distribution
or copying of this transmission is strictly prohibited. If you have received
this communication in error, please notify us immediately by reply or by
telephone (call us at +1-212-809-7200) and immediately delete this message
and all its attachments.


-----Original Message-----
From: Shaun Lipscombe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 12:44 PM
To: Log4NET User
Subject: Re: Config not honoring appender

* Dean Fiala wrote:

> Your root logger logs to the file appender, and since all log events go to
> to the root logger, it will write to both places.  It is possible to only
> have the logger write to the specified log and not the root logger, but
that
> is not something I have wrapped my head around yet.

I had actually considered that this may be the case although I've not
read anything about it in the documentation.

I was thinking that maybe instead of the Appender overriding the other
appender it is infact appended (no pun intended ;-) thus giving two
appenders for the logger foo.bar.  Other options are overridden like
<level> etc.  I guess <appender-ref>'s are accumulated (via inheritance
or otherwise).

Or am I barking up the wrong XML-tree (couldn't resist that one I'm afraid).

Reply via email to