Summary: | [PATCH] RotateLogs.exe with less granular time formatted names keep growing log files thereby exhausting disk space | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Thangaraj AntonyCrouse <thangaraj> |
Component: | Other Modules | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | thangaraj |
Priority: | P2 | Keywords: | PatchAvailable |
Version: | 2.2.17 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows Server 2003 | ||
Attachments: | Fix for RotateLogs.exe to overwrite logs having less granular time formatted names |
Description
Thangaraj AntonyCrouse
2011-04-18 22:11:59 UTC
I'd vote -1 on this patch. rotatelogs is designed to be nondestructive, and you propose to add destructive behavior to the log records. (In reply to comment #1) > I'd vote -1 on this patch. > > rotatelogs is designed to be nondestructive, and you propose to add destructive > behavior to the log records. this alarmed me as well, if you don't add reasonable granularity to the filename, letting it grow until someone notices is better than truncating it periodically. (In reply to comment #2) > (In reply to comment #1) > > I'd vote -1 on this patch. > > > > rotatelogs is designed to be nondestructive, and you propose to add destructive > > behavior to the log records. > this alarmed me as well, if you don't add reasonable granularity to the > filename, letting it grow until someone notices is better than truncating it > periodically. Appreciate your comments. This path provides the best of both worlds - non-destructive and destructive modes of operation. If users don't like destructive mode - they can use large file size option. If users like me don't want Server disk space to be exhausted and prefer log overwriting they can use small file size as option with less granular time format (as mentioned in docs: http://httpd.apache.org/docs/2.2/programs/rotatelogs.html). If Rotatelogs is meant to be non-destructive always - I'm trying to understand then why do we even have filesize option? > If Rotatelogs is meant to be non-destructive always - I'm trying to understand
> then why do we even have filesize option?
rotatelogs file size option is intended to allow the user to roll over at a given
limit, for archival purposes; not to destroy the log. I would suggest that if
you want a destructive / sampling behavior as opposed to a record of operations,
then a new utility would be more appropriate than modifying rotatelogs.
Based on two committers negative feedback to destructive operation, I'm going
to mark this INVALID for now as the documentation is very clear, but further
httpd developer comments are welcome.
"When using strftime(3) filename formatting, be sure the log file format has enough granularity to produce a different file name each time the logs are rotated. Otherwise rotation will overwrite the same file instead of starting a new one. For example, if logfile was /var/logs/errorlog.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file."
|