-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Michelle,
On 1/3/15 8:15 PM, Michelle Warner wrote: > > ----- 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. You can configure Tomcat to use log4j instead of JULI: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j Rotation options for catalina.out: http://wiki.apache.org/tomcat/FAQ/Logging#Q10 Note that rotating catalina.out should be entirely unnecessary. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUqwTcAAoJEBzwKT+lPKRYbw8P/1a6PQrJ+Xz4hXVbjmWi1QgY QYTtJNn8Ww9Id22ZSbV/DzppZjU2Ej2DUqC4XfRZGiXlwR61jywrMPFAlyVNHFjq RgMdDHJz5x2WB2a7wWSsX4w+2GV/hGG6L0x+dJmRJ+5/LADRoJc/Myw/8LlbuPPy ZhsKe9jSwoQhwoDjTMuU0m3hdQmkfh6JHrXodv3VblI5CdamD/G3d0+VjrlY9sWD 0UGqD8tsVvBhlSokijPUjRwFEQutyIc0GXIk3aCwNFED86fOFEUewqATExBLohje Gi9jpNIrnQwUgmMcDcjorWSLAKAKQ0BbWx7GOmeL0RlifRQNYD3XFGrQ/Waa2wrc EI20rldOMxQeM9Bx6bVLw57/LDF7D+NuAtxACBw/c/0RpPePHR1B049nt8M4yaE5 OfdLPi3/dQ/bPQu3YOEtElbVNyQRjaKloK2DjBUvK97OkiMINfgR3TP1vz8pqQuy F81qQ24CV0Av64FZRNeMByGhPYKjs5CiRjM+jq6jdvrfdgR7LnVX0rvBeioB4C2S qOE/bfCO/BJ3PwLteW/OJ5KAG+246rz+jn7GGL+eTXLxsQnZ/OAVz6ZCSAb4ZcUZ GNATmAgKL/Oab4Wh7krdeKiD1MIu9LHlYj81RvHUGFsW209QaUU08Yghuo5MLLPV hjKWpWJhwb7qde2eltoE =tKPQ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org