Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rotation of catalina logs per day

 
paramdeep Narang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi,

I want to rotate tomcat catalina logs per day.
Could you please tell me how to rotate logs and also how to use cronolog in it.


Regards
Paramdeep Singh
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "rotate tomcat catalina logs"?

Maybe you have RollingFileAppender in mind. Check that out...

Cheers,
Raj.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Catalina.out is just a dump from the java.utilities.logging service (JULI) to the Tomcat JVM's stdout file, which is redirected from the console by the Tomcat startup script.

To get that information to rotate, you'd need to reconfigure logging to use a true logging channel that has rotation capabilities. I don't remember if JULI has such a thing, though. Log4j does, although to use Log4j, you'd need to follow the instructions in the Tomcat docs on how to reconfigure logging, and IIRC, that includes actually doing a custom Tomcat build.

Or, if you're running in an environment that doesn't require 24x7 uptime, you can cheat. Shutdown Tomcat, move (rotate) the log using a shell script, restart Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic