https://issues.apache.org/bugzilla/show_bug.cgi?id=51081
Summary: [PATCH] RotateLogs.exe with less granular time
formatted names keep growing thereby exhausting disk
space
Product: Apache httpd-2
Version: 2.2.17
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Keywords: PatchAvailable
Severity: normal
Priority: P2
Component: Other Modules
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=26900)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26900)
Fix for RotateLogs.exe to overwrite logs having less granular time formatted
names
Problem:
RotateLogs.exe with less granular time formatted names keep growing thereby
exhausting disk space.
Reproduction Steps:
1. Edit httpd.conf file to contain following lines
LogLevel debug
ErrorLog "|| bin/rotatelogs.exe logs/error-%Z.log 1M"
2. Run Apache for few hours.
Actual Result- Log file size grows beyond 1 MB
Expected Result- Log files should not grow beyond 1 MB, it should get
overwitten.
Solution:
Reset nAppend flag in RotateLogs.c such that size based rotation will overwrite
existing file thereby honoring the given Size limit as stated in
http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
Copying HTML exerpt here: 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.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]