• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

rotation of catalina logs per day

 
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
 
Ranch Hand
Posts: 450
1
IntelliJ IDE Spring Java
  • 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.
 
Bartender
Posts: 20940
127
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!