LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about log-rotation on "catalina.out" from Tomcat (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-log-rotation-on-catalina-out-from-tomcat-765270/)

thomas2004ch 10-29-2009 06:31 AM

A question about log-rotation on "catalina.out" from Tomcat
 
I am not sure if I should post my question here. Just try, maybe someone can answer.

I have now a problem/question:

I've installed Tomcat 5.5.27 on Linux. Though the "catalina.out" will be rotated everyday, i.g. "catalina.yyyy-mm-dd.log. But the "catalina.out"-self doesn't begin from the new day but still contains the old log messages. I've heard this is default setting. Is it true?

How can I improve this log-rotation so that everyday the "catalina.out" will be closed and renamed and a new one created which just holds the current day log messages?

chrism01 10-29-2009 08:47 PM

Show the content of the logrotate cfg for this file. Sounds like you haven't got 'truncate' option on.

thomas2004ch 10-30-2009 03:21 AM

Quote:

Originally Posted by chrism01 (Post 3737397)
Show the content of the logrotate cfg for this file. Sounds like you haven't got 'truncate' option on.

Here it is:

Code:

[ivs@s003ap25-test ~]$ more /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.
[ivs@s003ap25-test ~]$

Here I can't see anything to do with Tomcat "catalina.out".


All times are GMT -5. The time now is 05:50 PM.