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

Aaron,

This seems in sync with what I would expect from a thread safety
problem.

Can you confirm that the Log4j initialization happens properly?  Does
anything get written to the logs before the problem occurs?  If so,
then we can assume that the appender is somehow getting clobbered
later on.

Static initializers are very convenient, but sometimes the
interactions can get hairy.  Just because you see those Categories
getting initialized in your source code does not mean the
initialization is actuall happening correctly.

Is everything running in a single JVM?  Or might you have multiple
JVMs instantiating appenders that want to write to the same file(s)?
I haven't looked through that portion of the Log4j source yet, but it
is not unreasonable for an Appender to try for exclusive access to a
file, meaning that other Appenders would fail at startup.

Go nuts with System.out.println and see what you find.

--mkb



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

Reply via email to