Bug 130141
Summary: | logrotate.d creates useless empty logs | ||
---|---|---|---|
Product: | [Retired] Red Hat Application Server | Reporter: | Johnathan Kupferer <kupferer> |
Component: | tomcat | Assignee: | Permaine Cheung <pcheung> |
Status: | CLOSED NEXTRELEASE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-08-19 15:59:01 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Johnathan Kupferer
2004-08-17 14:18:34 UTC
Hi Johnathan, According to the man pages for logrotate, with the copytruncate directive, the create option should have no effect, as the old log file stays in place. Is the new empty log file created by logrotate? What files are there under /var/log/tomcat5? Also, please upgrade to tomcat5-5.0.27-2jpp_1rh as that's what we have for our final release. Regards, Permaine Ah, missed that. How about nocreate _instead_ of copytruncate? The issue is that tomcat logfile names contain the date so I'm ending up with logrotate takes localhost_log.2004-08-12.txt and creates a localhost_log.2004-08-12.txt.1.gz, but leaves a truncated file behind with the original name. Since tomcat rotates these filenames, there doesn't seem to be any reason to produce the truncated files and they just wind up cluttering the directory. BTW, I updated to the newest tomcat5 as suggested and the issue still exists. I think we want to keep the new logs around, so we'll keep the create option. New logs will be created and written to after the logs are rotated with this logrotate configuration: /var/log/tomcat5/*.txt /var/log/tomcat5/catalina.out { weekly rotate 52 compress missingok sharedscripts postrotate [ -e /var/lock/subsys/tomcat5 ] && kill -USR1 `cat /var/run/tomcat5.pid 2>/dev/null` 2>/dev/null || true endscript } I've submitted this fix upstream to jpackage.org, I'm closing this as NEXTRELEASE. I think we've been talking past each other, either that or I'm just confused. Sorry to keep harping on a cosmetic issue like this. I am now using: /var/log/tomcat5/*.txt { nocreate weekly rotate 52 compress missingok } /var/log/tomcat5/catalina.out { copytruncate weekly rotate 52 compress missingok } Because the original behavior seemed correct for catalina.out, just not for the *.txt logs which already have the date embedded in the filenames. I'll go post this to the jpackage-discuss mailing list as well. |