On Tue, Jan 28, 2014 at 10:17 AM, Konstantin Kolinko <[email protected]> wrote: > 2014-01-28 Vye <[email protected]>: >> On Tue, Jan 28, 2014 at 9:32 AM, Daniel Mikusa <[email protected]> wrote: >>> On Jan 28, 2014, at 12:05 PM, Vye <[email protected]> wrote: >>>> >>>> I have been unsuccessfully trying to remove the date from catalina's >>>> log file name. My ultimate goal is to logrotate the file, which is >>>> best done when the file name is static. >>> >>>> According to the FileHandler >>>> javadoc ( >>>> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/juli/FileHandler.html >>>> ) I should be able to configure >>>> *.org.apache.juli.FileHandler.rotatable in >>>> ${catalina.base}/conf/logging.properties to toggle date based file >>>> names, but that is not working. >>>> >>>> It seems like I could fix this by using log4j but I'm not sure if the >>>> application is logging directly to JULI or commons-logging. >>>> Regardless, I do not have access to modify it. I would like to >>>> continue to use the default JULI logger since it is already in use. >>>> Judging by the docs what I'm trying to do should be possible. >>>> >>>> I'm positive the logging.properties file is being read because when I >>>> change the prefix and suffix they are applied upon restart. I've >>>> pasted my logging.properties and sample output in this gist: >>>> http://git.io/99qidw Anyone can wget the raw logging.properties and >>>> download tomcat from the archives to reproduce. >>>> >>>> I would appreciate it if someone could point me in the right >>>> direction. I've been referencing >>>> http://tomcat.apache.org/tomcat-6.0-doc/logging.html. >>>> >>>> Tomcat version: http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.20/bin/ >>>> >> >> Hi Dan, >> >> I am aware of the concerns, it is a legacy system that is already >> being phased out. The log files are rotated out of box but they cannot >> be automatically compressed or deleted after a waiting period, which >> is the functionality I want. >> >> Does the JULI logger not work as documented? Sure there are other ways >> to keep the logs cleaned up, but my question is specifically regarding >> the rotatable option for JULI. >> > > IIRC the "rotatable" option was added several years ago and does not > exist in such old version as 6.0.20. Another reason for an upgrade? > > You can use java.util.logging.FileHandler class. > Tomcat JULI can use any java.util.logging handlers. (E.g. the default > configuration already uses ConsoleHandler). > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
Konstantin, That was helpful. With any luck we won't be using it much longer. Thanks. -- -Vye --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
