2

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.

1
  • Did you find solution?
    – sunleo
    Jan 17 '18 at 6:09
2

You may use logrotate to manage Catalina.out

https://dzone.com/articles/how-rotate-tomcat-catalinaout

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.