Bug 723797

Summary: Suggestion: add feature to rotate on either time or size criteria
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 15CC: jkaluza, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 09:07:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Göran Uddeborg 2011-07-21 07:52:35 UTC
Description of enhancement suggestion:
As demonstrated by bug 723570, one might wish to rotate a log as soon as either a size limit or a time limit is reached.  Currently, logrotate supports rotation when two such limits are both reached (the "minsize" configuration, the conjunction of the criteria).  It seems reasonable to add support for the case when any of them (maybe a "maxsize" configuration, the disjunction of the criteria).

Version-Release number of selected component (if applicable):
logrotate-3.7.9-11.fc15.x86_64

Comment 1 Jan Kaluža 2011-07-25 09:43:13 UTC
*** Bug 723565 has been marked as a duplicate of this bug. ***

Comment 2 Jan Kaluža 2011-08-03 07:57:47 UTC
OK, after re-reading man page we've really decided to allow using size and time together and let both of them trigger rotation. I will try to code it today and push it into rawhide. Then it'll be there for some time for testing.

Comment 3 Jan Kaluža 2011-08-04 12:24:25 UTC
I've committed it upstream https://fedorahosted.org/logrotate/changeset/337.

I've created new "maxage" directive in the end, to not break compatibility with older logrotate versions. I will also fix #723565 in next commit and build package then.

Comment 4 Jan Kaluža 2012-07-17 09:07:20 UTC
This is fixed in F17 and I don't plan to backport this feature older Fedora versions.

Comment 5 Göran Uddeborg 2012-07-17 20:59:48 UTC
This was a request for a new feature, and I don't see any reason to backport to older distributions.  Thanks for making it available in F17!