You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Laurent Blume <la...@infores.com> on 2003/10/28 14:47:50 UTC
log4j losing log files
Hello all,
I hope this is not too much of a newbie question. I did look through the
documentation and on the internet, but I might have not done it the
right way.
Anyway, here is the problem:
I'm using log4j 1.2.8 in several webapps, for each it is inside a class
used by several JSPs.
The application server is Tomcat 4.1.27, running on Windows 2000 SP4
behind an Apache 2.0.47 server on the same machine.
The JDK is 1.4.2 (not quite the last one, but close enough).
The log4j1.2.8.jar file is in each webapp/WEB-INF/lib.
Each webapp has its own config file in webapp/WEB-INF/classes.
Each config file contains:
log4j.rootLogger=DEBUG
log4j.logger.dev=DEBUG, dev
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.dev=org.apache.log4j.RollingFileAppender
log4j.appender.dev.File=C:/logs/dev_01.log
log4j.appender.dev.layout=org.apache.log4j.PatternLayout
log4j.appender.dev.layout.ConversionPattern=%d %X{RemoteHost} %C %-5p %c
- %m%n
log4j.appender.dev.MaxFileSize=1000KB
log4j.appender.dev.MaxBackupIndex=100
Where "dev_01.log" is different for each webapp.
It mostly works, ie, the "dev_01.log" file is always there. However, the
re are regularly "holes" in the backup of the file. I saw it happens,
when the current log file must be turned over, instead, it simply
disappears. The existing backup files are turned over, though.
When such a hole in the backups appears, it tends to stay there for a
while, but it eventually disappears.
That way, I can get such a list of files as:
.log
.log.10
.log.11
.log.12
.log.13
.log.14
.log.15
.log.16
.log.17
.log.18
.log.19
.log.20
.log.49
.log.50
.log.51
.log.52
.log.53
I simply don't have any idea about what is going on. I spend a lot of
time in Tomcat's logs, for developping, and they don't have that
problem, but they're rotated on a daily basis. I didn't see anything in
those logs about what might be going on.
Actually, once I tried to get also a daily rotation for the log4j logs,
but the problem got only worse, so I gave up (it was a while ago).
Anybody has an idea?
Many thanks in advance!
Laurent
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org