views:

885

answers:

1

We are using the Windows installation of Tomcat 6. By default, the log4j output for our app goes to the ${catalina.base}/logs/stdout_.log file. This log file only rolls over when we restart Tomcat, and the file name always includes the date.

I would prefer it to behave like a DailyRollingFileAppender, where it renames the file when it rolls over... that way I can just open Notepad++ and see today's logs, since Notepad++ will remember that I opened that same file yesterday. :)

I know I can just create another appender in log4j, but I would end up with the stdout.log and another log file, and I'm afraid there would be a minor performance hit for logging to both files. I've tried adding swallowOutput=true to my context.xml but I still get all logging in stdout.log. Any ideas?

A: 

Have you tried the steps outlined in Logging in Tomcat? If you follow the steps you'll end up with log4j.properties in the lib directory that you can customize to your heart's content.

Zoran Regvart