What is meant by "Attempted to append to closed appender " ?
The following is a small part of my log4j.xml file
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="TRACE" />
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p: %m%n" />
</layout>
</appender>
<logger name="java.sql" additivity="false">
<level value="trace" />
<appender-ref ref="stdout" />
</logger>
I am trying to print some sql queries out , but I am getting the above error . Am I missing something ?
I got this message when my log4j.xml contained, due to a copy-and-dont-edit, two loggers (aka categories) with the same name linked to the same appender.
In my case, I used 2 logger elements on same package name caught into this error. removing one of them solved the problem.
<logger name="org.activiti.engine" additivity="false">
<level value="error" />
<appender-ref ref="LOGFILE" />
</logger>
<logger name="org.activiti.engine" additivity="false">
<level value="debug" />
<appender-ref ref="activitiBPMLog" />
</logger>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With