logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ondra Babuljak <ondra.konfere...@seznam.cz>
Subject log4j doesn't create backup files in web-app, the same code in pure java app works fine
Date Fri, 05 Nov 2004 08:41:53 GMT
Hi,

in my application I have a class DummyLogger, which is a superclass to all others. It provides
them a log4j Logger.



In the constructor it sets up the important attributes:


log = Logger.getLogger(name+" (" + app + ") ");
log.setLevel(Level.toLevel(level));

PatternLayout defaultLayout = new PatternLayout("%p %c,line %L,%d{dd.MM.yyyy/HH:mm:ss},%m%n");

RollingFileAppender rollingFileAppender = new RollingFileAppender();
rollingFileAppender.setName(name);
rollingFileAppender.setFile(path+app+".log", true, false, 0);
rollingFileAppender.setMaxFileSize("10MB");
rollingFileAppender.setMaxBackupIndex(5);
rollingFileAppender.setLayout(defaultLayout);

log.removeAllAppenders();
log.addAppender(rollingFileAppender);
log.setAdditivity(false);




Formerly I had the application as a pure java app and everything worked fine. Now I've made
it a web application (I run it on WebsphereAS 5.0) and it has stopped creating the backup
files. However the code remained the same.
Any ideas what has happend?



Thanks a lot,
Ondra

____________________________________________________________
http://www.bezpecnyinternet.cz
http://ad.seznam.cz/clickthru?spotId=80833

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message