-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thomas, (Looks like my first attempt got botched. Here it is, again.) On 10/29/2009 5:17 AM, thomas2004 wrote: > > I've installed Tomcat 5.5.27 on Linux. Though the "catalina.out" will be > > rotated everyday, i.g. "catalina.yyyy-mm-dd.log. But the "catalina.out"-self > > doesn't begin from the new day but still contains the old log messages. I've > > heard this is default setting. Is it true? > > > > How can I improve this log-rotation so that everyday the "catalina.out" will > > be closed and a new one created which just holds the current day log > > messages? How do you do log rotation? Tomcat does not include any catalina.out log rotation in the standard package, so you (or someone else) must have added such a technique. There have been several questions in this list in the last year or so about rotating catalina.out and the bottom line is that catalina.out log rotation is a black art and requires that you really consider all the moving parts in the system. My suggestion: change catalina.out into a named pipe on the disk (since you're on *NIX) and run a program that's meant to consume log messages from a named pipe and write them to a rotated log file (or database, or syslog, or whatever). I believe this will give you the file rotation you desire and ensure that you don't lose any log messages during the rotation. Frankly speaking, catalina.out should not be getting any messages written to it besides Tomcat startup and shutdown information. Everything else should be explicitly set to use "real" logging mechanisms. [Cue Andre's rant about logging configuration in Tomcat 5+] - - -chris - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrpuBcACgkQ9CaO5/Lv0PBgoQCgrF3Mx+YvS7uu7Hocw5VXE+P6 77sAnA89GALqo8P53eGR9nR2u7oNDhwG =xmwx - -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrpzDsACgkQ9CaO5/Lv0PDVKQCbBdhbw4d7SNIlAzeCOiEaQgXP Zd8AniBz1+bwmpqQ3qLOZtz+ZT+e5s9s =Cb/s -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org