You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter <li...@gmail.com> on 2007/06/20 06:42:45 UTC

log4j error! log4j:ERROR Attempted to append to closed appender named.

hi,all

we are using log4j under tomcat. and it appeals  so many following erros ;

 log4j:ERROR Attempted to append to closed appender named [DEFAULT_LOGFILE].

does anyone has an idea why and how to sovle it.

thanks !

here is our log4j.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">

 <appender name="OTHERS_LOGFILE" class="org.apache.log4j.RollingFileAppender
">
  <param name="Threshold" value="DEBUG"/>
  <param name="File" value="../logs/others.log"/>
  <param name="Append" value="false"/>
  <param name="MaxFileSize" value="2000KB"/>
  <param name="MaxBackupIndex" value="10"/>
  <layout class=" org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  </layout>
 </appender>

 <appender name="DEFAULT_LOGFILE" class="
org.apache.log4j.RollingFileAppender">
  <param name="Threshold" value="DEBUG"/>
  <param name="File" value="../logs/shucoms.log"/>
  <param name="Append" value="false"/>
  <param name="MaxFileSize" value="2000KB"/>
  <param name="MaxBackupIndex" value="10"/>
  <layout class=" org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  </layout>
 </appender>



 <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">

  <appender-ref ref="OTHERS_LOGFILE"/>

  <appender-ref ref="DEFAULT_LOGFILE"/>

 </appender>

 <category name="gxlu.eoms" additivity="false">
  <priority value="DEBUG"/>
  <appender-ref ref="DEFAULT_LOGFILE"/>
 </category>
 <category name="org" additivity="false">
  <priority value="INFO"/>
  <appender-ref ref="OTHERS_LOGFILE"/>
 </category>

<!-- Setup the Root category -->
 <root>
  <priority value="DEBUG"/>
  <appender-ref ref="ASYNC"/>
 </root>
</log4j:configuration>

Re: Re[2]: log4j error! log4j:ERROR Attempted to append to closed appender named.

Posted by Peter <li...@gmail.com>.
i will try this
thanks


On 6/20/07, 吴熊敏 <xw...@ublearning.com> wrote:
>
>
> <param name="Append" value="false"/>
>
> change Append's value 'true' and try again
>
> On Wed, 20 Jun 2007 13:18:01 +0800
> Peter <li...@gmail.com> wrote:
>
> > thanks
> >
> > but it also generate log file as well. log file can be write.
> >
> > i donot know if the error:
> >
> >  *log4j:ERROR Attempted to append to closed appender named
> > [DEFAULT_LOGFILE].*
> >
> > will slow down our system or this error can be ignored?
> >
> > how to solve it
> >
> > thanks
> >
> >
> > On 6/20/07, 吴熊敏 <xw...@ublearning.com> wrote:
> > >
> > > I think the configuration of LOG4J has some problems
> > >
> > > <param name="File" value="../logs/others.log"/>
> > >
> > > System can't find the log file.
> > >
> > > On Wed, 20 Jun 2007 12:42:45 +0800
> > > Peter <li...@gmail.com> wrote:
> > >
> > > > hi,all
> > > >
> > > > we are using log4j under tomcat. and it appeals  so many following
> erros
> > > ;
> > > >
> > > >  log4j:ERROR Attempted to append to closed appender named
> > > [DEFAULT_LOGFILE].
> > > >
> > > > does anyone has an idea why and how to sovle it.
> > > >
> > > > thanks !
> > > >
> > > > here is our log4j.xml
> > > >
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> > > >
> > > > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > > debug="false">
> > > >
> > > >  <appender name="OTHERS_LOGFILE" class="
> > > org.apache.log4j.RollingFileAppender
> > > > ">
> > > >   <param name="Threshold" value="DEBUG"/>
> > > >   <param name="File" value="../logs/others.log"/>
> > > >   <param name="Append" value="false"/>
> > > >   <param name="MaxFileSize" value="2000KB"/>
> > > >   <param name="MaxBackupIndex" value="10"/>
> > > >   <layout class=" org.apache.log4j.PatternLayout">
> > > >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> > > >   </layout>
> > > >  </appender>
> > > >
> > > >  <appender name="DEFAULT_LOGFILE" class="
> > > > org.apache.log4j.RollingFileAppender">
> > > >   <param name="Threshold" value="DEBUG"/>
> > > >   <param name="File" value="../logs/shucoms.log"/>
> > > >   <param name="Append" value="false"/>
> > > >   <param name="MaxFileSize" value="2000KB"/>
> > > >   <param name="MaxBackupIndex" value="10"/>
> > > >   <layout class=" org.apache.log4j.PatternLayout">
> > > >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> > > >   </layout>
> > > >  </appender>
> > > >
> > > >
> > > >
> > > >  <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
> > > >
> > > >   <appender-ref ref="OTHERS_LOGFILE"/>
> > > >
> > > >   <appender-ref ref="DEFAULT_LOGFILE"/>
> > > >
> > > >  </appender>
> > > >
> > > >  <category name="gxlu.eoms" additivity="false">
> > > >   <priority value="DEBUG"/>
> > > >   <appender-ref ref="DEFAULT_LOGFILE"/>
> > > >  </category>
> > > >  <category name="org" additivity="false">
> > > >   <priority value="INFO"/>
> > > >   <appender-ref ref="OTHERS_LOGFILE"/>
> > > >  </category>
> > > >
> > > > <!-- Setup the Root category -->
> > > >  <root>
> > > >   <priority value="DEBUG"/>
> > > >   <appender-ref ref="ASYNC"/>
> > > >  </root>
> > > > </log4j:configuration>
> > >
> > > ----------------------------
> > > 吴熊敏 <xw...@ublearning.com>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
>
> ----------------------------
> 吴熊敏 <xw...@ublearning.com>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re[2]: log4j error! log4j:ERROR Attempted to append to closed appender named.

Posted by 吴熊敏 <xw...@ublearning.com>.
<param name="Append" value="false"/>

change Append's value 'true' and try again

On Wed, 20 Jun 2007 13:18:01 +0800
Peter <li...@gmail.com> wrote:

> thanks
> 
> but it also generate log file as well. log file can be write.
> 
> i donot know if the error:
> 
>  *log4j:ERROR Attempted to append to closed appender named
> [DEFAULT_LOGFILE].*
> 
> will slow down our system or this error can be ignored?
> 
> how to solve it
> 
> thanks
> 
> 
> On 6/20/07, 吴熊敏 <xw...@ublearning.com> wrote:
> >
> > I think the configuration of LOG4J has some problems
> >
> > <param name="File" value="../logs/others.log"/>
> >
> > System can't find the log file.
> >
> > On Wed, 20 Jun 2007 12:42:45 +0800
> > Peter <li...@gmail.com> wrote:
> >
> > > hi,all
> > >
> > > we are using log4j under tomcat. and it appeals  so many following erros
> > ;
> > >
> > >  log4j:ERROR Attempted to append to closed appender named
> > [DEFAULT_LOGFILE].
> > >
> > > does anyone has an idea why and how to sovle it.
> > >
> > > thanks !
> > >
> > > here is our log4j.xml
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> > >
> > > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > debug="false">
> > >
> > >  <appender name="OTHERS_LOGFILE" class="
> > org.apache.log4j.RollingFileAppender
> > > ">
> > >   <param name="Threshold" value="DEBUG"/>
> > >   <param name="File" value="../logs/others.log"/>
> > >   <param name="Append" value="false"/>
> > >   <param name="MaxFileSize" value="2000KB"/>
> > >   <param name="MaxBackupIndex" value="10"/>
> > >   <layout class=" org.apache.log4j.PatternLayout">
> > >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> > >   </layout>
> > >  </appender>
> > >
> > >  <appender name="DEFAULT_LOGFILE" class="
> > > org.apache.log4j.RollingFileAppender">
> > >   <param name="Threshold" value="DEBUG"/>
> > >   <param name="File" value="../logs/shucoms.log"/>
> > >   <param name="Append" value="false"/>
> > >   <param name="MaxFileSize" value="2000KB"/>
> > >   <param name="MaxBackupIndex" value="10"/>
> > >   <layout class=" org.apache.log4j.PatternLayout">
> > >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> > >   </layout>
> > >  </appender>
> > >
> > >
> > >
> > >  <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
> > >
> > >   <appender-ref ref="OTHERS_LOGFILE"/>
> > >
> > >   <appender-ref ref="DEFAULT_LOGFILE"/>
> > >
> > >  </appender>
> > >
> > >  <category name="gxlu.eoms" additivity="false">
> > >   <priority value="DEBUG"/>
> > >   <appender-ref ref="DEFAULT_LOGFILE"/>
> > >  </category>
> > >  <category name="org" additivity="false">
> > >   <priority value="INFO"/>
> > >   <appender-ref ref="OTHERS_LOGFILE"/>
> > >  </category>
> > >
> > > <!-- Setup the Root category -->
> > >  <root>
> > >   <priority value="DEBUG"/>
> > >   <appender-ref ref="ASYNC"/>
> > >  </root>
> > > </log4j:configuration>
> >
> > ----------------------------
> > 吴熊敏 <xw...@ublearning.com>
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

----------------------------
吴熊敏 <xw...@ublearning.com>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: log4j error! log4j:ERROR Attempted to append to closed appender named.

Posted by Peter <li...@gmail.com>.
thanks

but it also generate log file as well. log file can be write.

i donot know if the error:

 *log4j:ERROR Attempted to append to closed appender named
[DEFAULT_LOGFILE].*

will slow down our system or this error can be ignored?

how to solve it

thanks


On 6/20/07, 吴熊敏 <xw...@ublearning.com> wrote:
>
> I think the configuration of LOG4J has some problems
>
> <param name="File" value="../logs/others.log"/>
>
> System can't find the log file.
>
> On Wed, 20 Jun 2007 12:42:45 +0800
> Peter <li...@gmail.com> wrote:
>
> > hi,all
> >
> > we are using log4j under tomcat. and it appeals  so many following erros
> ;
> >
> >  log4j:ERROR Attempted to append to closed appender named
> [DEFAULT_LOGFILE].
> >
> > does anyone has an idea why and how to sovle it.
> >
> > thanks !
> >
> > here is our log4j.xml
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> >
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > debug="false">
> >
> >  <appender name="OTHERS_LOGFILE" class="
> org.apache.log4j.RollingFileAppender
> > ">
> >   <param name="Threshold" value="DEBUG"/>
> >   <param name="File" value="../logs/others.log"/>
> >   <param name="Append" value="false"/>
> >   <param name="MaxFileSize" value="2000KB"/>
> >   <param name="MaxBackupIndex" value="10"/>
> >   <layout class=" org.apache.log4j.PatternLayout">
> >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> >   </layout>
> >  </appender>
> >
> >  <appender name="DEFAULT_LOGFILE" class="
> > org.apache.log4j.RollingFileAppender">
> >   <param name="Threshold" value="DEBUG"/>
> >   <param name="File" value="../logs/shucoms.log"/>
> >   <param name="Append" value="false"/>
> >   <param name="MaxFileSize" value="2000KB"/>
> >   <param name="MaxBackupIndex" value="10"/>
> >   <layout class=" org.apache.log4j.PatternLayout">
> >    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
> >   </layout>
> >  </appender>
> >
> >
> >
> >  <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
> >
> >   <appender-ref ref="OTHERS_LOGFILE"/>
> >
> >   <appender-ref ref="DEFAULT_LOGFILE"/>
> >
> >  </appender>
> >
> >  <category name="gxlu.eoms" additivity="false">
> >   <priority value="DEBUG"/>
> >   <appender-ref ref="DEFAULT_LOGFILE"/>
> >  </category>
> >  <category name="org" additivity="false">
> >   <priority value="INFO"/>
> >   <appender-ref ref="OTHERS_LOGFILE"/>
> >  </category>
> >
> > <!-- Setup the Root category -->
> >  <root>
> >   <priority value="DEBUG"/>
> >   <appender-ref ref="ASYNC"/>
> >  </root>
> > </log4j:configuration>
>
> ----------------------------
> 吴熊敏 <xw...@ublearning.com>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: log4j error! log4j:ERROR Attempted to append to closed appender named.

Posted by 吴熊敏 <xw...@ublearning.com>.
I think the configuration of LOG4J has some problems

<param name="File" value="../logs/others.log"/>

System can't find the log file.

On Wed, 20 Jun 2007 12:42:45 +0800
Peter <li...@gmail.com> wrote:

> hi,all
> 
> we are using log4j under tomcat. and it appeals  so many following erros ;
> 
>  log4j:ERROR Attempted to append to closed appender named [DEFAULT_LOGFILE].
> 
> does anyone has an idea why and how to sovle it.
> 
> thanks !
> 
> here is our log4j.xml
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="false">
> 
>  <appender name="OTHERS_LOGFILE" class="org.apache.log4j.RollingFileAppender
> ">
>   <param name="Threshold" value="DEBUG"/>
>   <param name="File" value="../logs/others.log"/>
>   <param name="Append" value="false"/>
>   <param name="MaxFileSize" value="2000KB"/>
>   <param name="MaxBackupIndex" value="10"/>
>   <layout class=" org.apache.log4j.PatternLayout">
>    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
>   </layout>
>  </appender>
> 
>  <appender name="DEFAULT_LOGFILE" class="
> org.apache.log4j.RollingFileAppender">
>   <param name="Threshold" value="DEBUG"/>
>   <param name="File" value="../logs/shucoms.log"/>
>   <param name="Append" value="false"/>
>   <param name="MaxFileSize" value="2000KB"/>
>   <param name="MaxBackupIndex" value="10"/>
>   <layout class=" org.apache.log4j.PatternLayout">
>    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
>   </layout>
>  </appender>
> 
> 
> 
>  <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
> 
>   <appender-ref ref="OTHERS_LOGFILE"/>
> 
>   <appender-ref ref="DEFAULT_LOGFILE"/>
> 
>  </appender>
> 
>  <category name="gxlu.eoms" additivity="false">
>   <priority value="DEBUG"/>
>   <appender-ref ref="DEFAULT_LOGFILE"/>
>  </category>
>  <category name="org" additivity="false">
>   <priority value="INFO"/>
>   <appender-ref ref="OTHERS_LOGFILE"/>
>  </category>
> 
> <!-- Setup the Root category -->
>  <root>
>   <priority value="DEBUG"/>
>   <appender-ref ref="ASYNC"/>
>  </root>
> </log4j:configuration>

----------------------------
吴熊敏 <xw...@ublearning.com>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org