Hello Paulo!

For Tomcat Logs, you have 2 Problems:

1. catalina.out and catalina.err
These files contain standard out and standard error output. If your webapps 
write a lot with System.out.println() these logs will fill up quickly. The only 
way to handle these is to shut down tomcat, rotate the files, and restart 
tomcat. This is why webapps should always use a logger, and not write to 
standard out directly.
You can deal with badly behaved webapps by setting the attribute 
"swallowOutput=true" on the context for the webapp.
See: 
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_Implementation

2. For all the other log-files
The files are created by log4j --> you can configure log4j to automatically 
roll the files for you. This will happen entirely transparently, and without 
needing to shutdown tomcat.
See the "DailyRollingFileAppender" and "RollingFileAppender" from log4j for 
more infos.
See: 
http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/DailyRollingFileAppender.html
And: http://logging.apache.org/log4j/1.2/manual.html

Regards from Vienna,

Richard

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Magnolia Forums (on behalf of Paulo Roberto de Camargo Mello 
Junior)
Gesendet: Freitag, 01. Juli 2011 20:21
An: Magnolia User List
Betreff: [magnolia-user] Re: Logrotate linux environment


I really need shutdown the tomcat-magnolia during the logrotate?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=e07a6679-6989-4d00-9bf3-69749aa45251


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

  • [magn... Magnolia Forums (on behalf of Paulo Roberto de Camargo Mello Junior)
    • ... Magnolia Forums (on behalf of Paulo Roberto de Camargo Mello Junior)
      • ... Unger, Richard
    • ... Magnolia Forums (on behalf of Gr?gory Joseph)

Reply via email to