Tomcat 8 limit size of Catalina.out
You may use logrotate to manage Catalina.out
https://dzone.com/articles/how-rotate-tomcat-catalinaout
Related videos on Youtube
korodani
Updated on September 18, 2022Comments
-
korodani over 1 year
I have Tomcat 8 and my Catalina.out log is 3GB large, it takes a lot of space. In $CATALINA_HOME/conf/ I have logging.properties that contains:
1catalina.org.apache.juli.AsyncFileHandler.level = FINE 1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
I want to limit the size of Catalina.out to let's say only 500MB. So every time when 500MB is reached, some of the first lines in the Catalina.out would have to delete themselves.
I've googled and found out that there are 2 ways of Tomcat logging, one is FileHandler (which I use) and the other one is Log4J.
But does FileHandler allow me to limit the size of the Catalina.out?
I know I can change FileHandler.level to some other value than FINE, but I want to stay at value FINE, these logs are important to me.
-
sunleo over 6 yearsDid you find solution?
-