Friday, May 18, 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: 1.2.9 - Attempted to append to closed appender named...
Prev Next
You are not authorized to post a reply.

Author Messages
Kremer, Mark

06/13/2005 9:06 PM  

I am testing a simple app that consists of one exe and 3 dlls. I am trying to set it up so that each project (the exe and each dll) have their own unique static logger, config file, and output file. When I run, I get the desired logging in the desired locations for the exe and the first dll that is called. But for the second and third dlls, I get the following errors. Any ideas as to what is causing this?

Thanks!
Mark

log4net:ERROR [ConsoleAppender] Attempted to append to closed appender named [PerformanceConsole].
log4net:ERROR [RollingFileAppender] Attempted to append to closed appender named [PerformanceRollingFile].
log4net:ERROR [ConsoleAppender] Attempted to append to closed appender named [LoggingConsole].
log4net:ERROR [RollingFileAppender] Attempted to append to closed appender named [LoggingRollingFile].


__________________________________________________

Mark Kremer                       
User Interface Specialist                            
ZOLL Data Systems (formerly Pinpoint Technologies)

               

12202 Airport Way, Suite 300
Broomfield, Colorado 80021

       

O (303) 801-1833
F (303) 801-0001
www.zolldata.com

Nicko Cadell

06/13/2005 9:28 PM  

Mark,

Can you send over your config file, and also can you reproduce this
situation with internal logging enabled:

http://logging.apache.org/log4net/release/faq.html#internalDebug

Cheers,

Nicko

Kremer, Mark

06/13/2005 9:35 PM  

Here's the config file for the exe (form1_log_config) and the three dlls.

-----Original Message-----
From: Nicko Cadell [mailto:nicko@neoworks.com]
Sent: Monday, June 13, 2005 1:29 PM
To: Log4NET User
Subject: RE: 1.2.9 - Attempted to append to closed appender named...


Mark,

Can you send over your config file, and also can you reproduce this
situation with internal logging enabled:

http://logging.apache.org/log4net/release/faq.html#internalDebug

Cheers,

Nicko

Kremer, Mark

06/14/2005 5:07 PM  

Here are the config files and the output from having internal debugging enabled.

Nicko Cadell

06/14/2005 6:13 PM  

Mark,

How are you loading the config files for the exe and dlls? Are you
calling the XmlConfigurator programmatically? And if so when?
Are you explicitly calling the LogManager.Shutdown method at any time?
Are the log4net:ERROR messages printed at or just before program exit?

Nicko

Kremer, Mark

06/14/2005 6:32 PM  

In the constructor of each, I am calling:

XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(@"C:\arc\sample clients\arc_prototype\form1_log_config.xml"));

with the file being different for each.

I am not calling LogManager.Shutdown() anywhere in the solution.

The ERROR messages are printed during runtime, as each dll is tyring to log

Nicko Cadell

06/14/2005 8:01 PM  

Mark,

Your 4 config files are being loaded into the same space and they are
being merged together as they are loaded. As they are watching their
source files they are also being reloaded in unpredictable orders.

As a first option can you try removing all the <appender-ref> elements
from the <root> element in all of your config files.

Is your intention to have completely separate logging configurations for
each or your dlls? If so you can specify a named log4net repository for
each assembly. Add the RepositoryAttribute to each assembly with a
different name:

[assembly: log4net.Config.Repository("assembly-name")]

Cheers,

Nicko

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > 1.2.9 - 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