Hi Paul (and the others),

this my log4j.xml file. During runtime i removed the 2 outcommenting lines. 
And later, i commented out again these category declarations.
As i said, log4j recognize the new declarations during runtime, but has a
problem when i 'remove' them during runtime.

log4j:ERROR Attempted to append to closed appender named [CMD].
log4j:WARN Not allowed to write to a closed appender.


Regards
Stefan

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

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' >

<appender name="CMD" class="org.apache.log4j.ConsoleAppender">
    <param name="Threshold" value="INFO"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p
%-35c %M() > %m%n"/>
    </layout>
</appender>

<category name="a.b.c.myclass" additivity="false">
    <priority value="WARN" />
    <appender-ref ref="CMD" />
</category>

<!--
<category name="a.b.c.myclass.foo" additivity="false">
    <priority value="INFO" />
    <appender-ref ref="CMD" />
</category>
<category name="a.b.c.myclass.foo.doo" additivity="false">
    <priority value="DEBUG" />
    <appender-ref ref="CMD" />
</category>
-->


</log4j:configuration>

-----Ursprungliche Nachricht-----
Von: Paul Glezen [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 8. Juni 2001 07:19
An: LOG4J Users Mailing List
Betreff: Re: Changing log4j config on the fly with 'configureAndWatch()'


Could you provide a snipet of the configuration file indicating the
entries you added and then took out.

Thanks,
- Paul

-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to