Running Jenkins through Tomcat 6 and noticed logs are added to /var/log/tomcat6. These logs seem to get rotated but 1) they seem to happen randomly (not time or size based), do not get compressed, nor seem to get deleted. So now my disk is 89% filled with ~30% tied up in logs. So wanted to ask how do you add rotation to these files and what are the defaults it seems to be using?
Looked around and there are plenty of discussions on how to (or not to) rotate catalina.out but what about the *.log files? I did find the tomcat logging.properties file which has:
1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.
3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.
4admin.org.apache.juli.FileHandler.level = FINE
4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4admin.org.apache.juli.FileHandler.prefix = admin.
5host-manager.org.apache.juli.FileHandler.level = FINE
5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
5host-manager.org.apache.juli.FileHandler.prefix = host-manager.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
I suspect I can add properties to this to do some sort of rotation, but cannot find documentation on it. Thanks for the help.
That seems to apply to the default Java logging not using the Juli classes. So Maybe I have to ditch the default all together? Seems surprising that this ships with no rotation, seems like it’s a ticking time bomb on every Jenkins/Hudson install.
Chris