• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Rotating Tomcat STDOUT_timestamp & STDErr_timestamp log files ?

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone

I am trying to rotate my tomcat STDOUT_timestamp & STDErr_timestamp logs.
The problem is with my app. (9 apps) which actually write to stdout (using consoleappender), this makes my stdout file
very large. so, i decided to rotate that stdout log file.

So, please does any one know if it is possible....can we use piped log just as apache server does?
please any solutions and suggestions are highly valuable....because i am kinda stuck here....


tomcat 5.5
windows xp operating system.

please let me know if you need anymore info...

thank you in advance
Saloon Keeper
Posts: 27879
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Suneel!

I recommend that you don't use the ConsoleAppender for individual webapps, except to log severe errors. The ability to rotate stdout/stderr varies depending on the OS. And although I believe there is a facility that you can pipe the stdout/stderr streams through that can be manipulated to do things like rotation, there are good reasons for not doing that.

You'll generally do better to have each application log its non-error messages to a separate logfile. That makes reading the logs easier, since you don't have to pick out the messages for whichever app you're investigating and you don't risk accidentally thinking that a message from a completely unrelated app is coming from the app you want to look at.

Also, there is an appender specifically designed to rotate logfiles, so you can very easily set up logfile rotation. You can't do that with stdout/stderr, since they are streams, not files.
    Bookmark Topic Watch Topic
  • New Topic