Hi all,
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
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