----- Original Message ----- From: "Christopher Schultz" <ch...@christopherschultz.net>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, December 30, 2014 9:41 AM
Subject: Re: Tomcat log dropping entries after log rotation


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Michelle,

On 12/29/14 8:55 PM, Michelle Warner wrote:
I am using Tomcat 8 with log4j2 to handle application logging. The
log4j2.xml and log4j-api-2.0-rc2/jar are both located in the lib
folder of Tomcat. After a log rotation, any ERROR log messages or
messages associated with a hot deployment stop logging. If I
bounce Tomcat, then the logging of those messages is restored.

Any ideas as to what could be causing this? I have not been able
to find anything in my searches.

How are you performing log rotation?

- -chris

I was using the time policy in the log4j2 property file. Had it set for one day. But I think I may have found the problem. We moved to using a single log file as it helped with trouble shooting because of the number of applications and services we have. That was our setup in JBoss and now that we are moving to Tomcat we wanted the same. So while log4j2 was rotating the log seemingly fine, it appears perhaps the problem was with Tomcat still using juli internally.

When I set our applications to log to a file other than catalina.out then that file rotated fine and there was no loss of logging after log rotation. So, while the internals of Tomcat are still logging to catalina.out we are able to log our application specific stuff and rotate it now without losing logging. Not sure how to fix the catalina.out rotation problem with log4j2 other than to make our applications use juli or perhaps some other implementation.

Michelle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to