-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alan,
On 1/23/13 7:33 PM, Alan Worstell wrote: > Hello, I'm using Tomcat 6.0.24-2ubuntu1.10 on Ubuntu 10.04.4 and I > am trying to disable datestamping and rotation of log files within > Tomcat so I can use logrotate for everything. I have added these > lines to /etc/tomcat6/logging.properties: > 1catalina.org.apache.juli.FileHandler.rotatable = false > 2localhost.org.apache.juli.FileHandler.rotatable = false > > From what I have read, this will set those files to be written as > prefix.suffix, rather than prefix.date.suffix as it does by > default. However, when I reload Tomcat after setting this, it is > creating: catalina.2013-01-23.log localhost.2013-01-23.log > > Any assistance would be greatly appreciated. I'd be careful about trying to use logrotate with Tomcat: if you move your log file, Tomcat will continue writing to it. If you copy-and-truncate the file, you may end up losing logs in the time between the start-of-copy and the end-of-truncate operation, or you may end up losing *all* logs after the first rotation. The reason Apache httpd works well with logrotate is because logrotate sends a signal to httpd that says "reset your logs". That closes the existing file descriptor (currently pointing to to a file that has been moved out of the way) and opens a new one to the original path name. Tomcat, JULI, log4j, etc. have no such mechanism and therefore implement log rotation internally. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEAjtgACgkQ9CaO5/Lv0PC/3QCfVGKJHDtvhXyX8dQufQvRvLfh BtYAniLF4oF15uhXbJKyTJKQXmI75W9W =RQHD -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org