Monday, May 21, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named []
Prev Next
You are not authorized to post a reply.

Author Messages
omatase

04/08/2009 12:17 AM  


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

Ron Grabowski

04/08/2009 1:09 AM  


Does this work?

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

omatase

04/08/2009 4:24 PM  



Ron Grabowski wrote:
>
>
> Does this work?
>
> <logger name="Invoicing">
>   <level value="DEBUG" />
>   <appender-ref ref="AdoNetAppender" />
>   <appender-ref ref="FileAppender" />
> </logger>
>
>

Yes there is no problem when I do that. That doesn't however allow me to
have my FATAL messages logged differently than my DEBUG messages which is
what I'm trying to accomplish.

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named []



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement