logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named []
Date Tue, 07 Apr 2009 23:09:13 GMT

Does this work?

<logger name="Invoicing">
  <level value="DEBUG" />
  <appender-ref ref="AdoNetAppender" />
  <appender-ref ref="FileAppender" />
</logger>


----- Original Message ----
From: omatase <Omatase@gmail.com>
To: log4net-user@logging.apache.org
Sent: Tuesday, April 7, 2009 6:17:29 PM
Subject: Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append
to closed appender named []


I cannot figure this one out. 

I have been tasked by my team to create a logging service so that we can all
have convenient logging without having to integrate it into our individual
projects. I decided to do this I would just build a wrapper around log4net
that makes it even simpler to use than it already is. 

After not too much work I got it up and running and (seemingly) working. I
had it running on a development web server here for people to begin using
with no issues initially.

Now I am getting this really really really crappy error whenever I try to
write a log no matter the loglevel or the logger being used. I have narrowed
it down to config file changes but cannot find an answer. 

The changes I narrowed it down to are:
If I have the following configuration in my log4net xml section everything
is fine

<root>
  <level value="DEBUG" />
  <appender-ref ref="AdoNetAppender" />
</root>

And if I add an additional logger suchas:

<logger name="Invoicing">
  <level value="DEBUG" />
  <appender-ref ref="AdoNetAppender" />
</logger>

we're still in good shape. But! When I add another logger with the same
"name" as another existing logger suchas:

<logger name="Invoicing">
  <level value="FATAL" />
  <appender-ref ref="FileAppender" />
</logger>

all hell breaks loose and I get the following error:

"log4net:ERROR [] Attempted to append to closed appender named []"

I am certain log4net is supposed to support a log strategy such as this so
that I can have fatal messages logged differently for the same logger name.
Can someone help me understand what's going on?

I can post any and all code I have if it will help diagnose the problem.

Thanks
-- 
View this message in context: http://www.nabble.com/Error-destroying-my-productivity-Please-Help%21%3A-log4net%3AERROR----Attempted-to-append-to-closed-appender-named----tp22939427p22939427.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

Mime
View raw message