Bug 67200 - Error Log Rotation Failure By rotatelogs
Summary: Error Log Rotation Failure By rotatelogs
Status: NEEDINFO
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Other Modules (show other bugs)
Version: 2.4.56
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-04 13:28 UTC by TongzhouZhang
Modified: 2023-09-04 14:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TongzhouZhang 2023-09-04 13:28:47 UTC
Hi, 

Appreciate some help here.. 

Error log isn't rotating logs with rotatelogs. 

Below I'm providing used ErrorLog directive, OS and Apache Versions. 
ErrorLog "|$/local/apache/2.4.56/bin/rotatelogs /local/apache/logs/test.com/error_logs.2.4.%Y.%m.%d 50M" 

When the size of Errorlog file reaches 50 MB, the Errorlog file is not rotated.

Thanks in Advance.
Comment 1 Eric Covener 2023-09-04 14:11:06 UTC
It is likely %d doesn't change so the new and old log filename are the same. If you're not rotating based on time, overriding the filename format is hard to manage.

If you want the data thrown away, you could use -T in this case.
If you want it rotated, I would remove all of the format strings from the filename and use the default timestamp.