Try using: <your appender instance>.activateOptions(); Right after you set the properties of the appender, like name, layout .. etc
-Kamal. -----Original Message----- From: Costa Basil [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 4:19 PM To: [email protected] Subject: log4j:ERROR Attempted to append to closed appender named I have been using log4j for a long time and until now I never had any problem. However, currently I am using Weblogic 9.1 with jdk 1.5 and log4j 1.2.13 in a web application and I started to get the dreaded 'log4j:ERROR Attempted to append to closed appender named...' errors and I don't understand why. Log4j is initialized in a setup servlet where I call PropertyConfigurator.configureAndWatch(logConfigFileName). The log4j jar file is deployed with the web application and it is not added the weblogic system path. log4j is configured using a properties file (sitting on the file system) that I've used for ages without any problem. But now the problem is that after I modify the properties file I get a whole slew of 'log4j:ERROR Attempted to append to closed appender named...' errors which I never got before when I used weblogic 8.1sp4 (jdk 1.4). I don't know if it helps but here is the content of the properties file: log4j.rootLogger=info, A02, CA #define the logger for the datamaintenance package log4j.logger.package1=debug, A02, CA log4j.additivity.package1=false log4j.logger.package2=debug, A02, CA log4j.additivity.package2=false #define the appender that will be used by the two packages as well as root #log4j.appender.A02=org.apache.log4j.ConsoleAppender log4j.appender.A02=org.apache.log4j.FileAppender log4j.appender.A02.File=logs/log_file.log log4j.appender.A02.layout=org.apache.log4j.PatternLayout log4j.appender.A02.layout.ConversionPattern=%d %p %x %l %t %m %n log4j.appender.CA=org.apache.log4j.ConsoleAppender log4j.appender.CA.layout=org.apache.log4j.PatternLayout log4j.appender.CA.layout.ConversionPattern=%d %p %x %l %t %m %n Can someone please explain why is this happening and if there is any fix? Thanks --------------------------------- Find your next car at Yahoo! Canada Autos --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
