1
votes

I am trying to implement log rotation for tomcat logs incl. stdout/ stderr where the current file will have constant names like stdout.log or stderr.log and on a daily basis it renames the previous log to stdout.<.log etc...

I tried using log4j dailyfileappender but that does not seem to do this. Is it possible to achieve this with log4j or do I have to use something like rotatelog/ cronolog in conjunction with it to achieve this?

My question is similar to the one here - Can you make the Tomcat 6 stdout.log file behave like a log4j DailyRollingFileAppender?. However, I have not been able to get log4j logging to give the necessary results

1

1 Answers

1
votes

For stdout/stderr you will have to use cronolog. I have used it with tomcat and it works like a charm.