Ceki's note jogged my memory on my problem, which is likely similar to
yours.
I'm guessing something during your WebLogic upgrade now attempts to use
Log4j before your configuration takes affect and in Log4j's initialization
attempts it finds another configuration file which creates an appender
with the same name as one that you are using and assigns it to the
rootLogger, but also uses the same appender with another logger. (This is
likely outside of your control--as it was in my case.)
So, when you reconfigure the rootLogger, it closes (but does not remove
from all loggers) the appender that you share in name. Since you didn't
know about the other logger that one of the JAR files includes, you don't
know to close it or to remove the appender from it.
So, what I was hoping for was the ability to remove any closed appenders
from the system, but I don't think that was available (the status on the
appender was not publicly available).
In my case, I need to dynamically change the configuration at startup, so
using the system property to identify the exact location of a static
configuration file was not possible for me. It might work for you.
Another possibility for you, would be to change the name of your appender
and it might go back to working.
--
Tom Goetze
"Fenderbosch, Eric" <[EMAIL PROTECTED]>
10/26/2004 08:36 AM
Please respond to "Log4J Users List"
To: "Log4J Users List" <[EMAIL PROTECTED]>
cc:
Subject: RE: Attempted to append to closed appender
Maybe it wasn't using 1.2.8 that's caused this to become visible. We also
recently upgraded from WebLogic 6.1 on 1.3.1 to 8.1 on 1.4.2. 6.1 and 8.1
certainly seem to have some differences in their threading behavior. Maybe
this is related.
We've been using configureAndWatch pretty much since starting to use
log4j, so well over two years.
Thanks Ceki and Tom for the help.