Bug 723797 - Suggestion: add feature to rotate on either time or size criteria
Summary: Suggestion: add feature to rotate on either time or size criteria
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 15
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 723565 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-21 07:52 UTC by Göran Uddeborg
Modified: 2012-07-17 20:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 09:07:20 UTC
Type: ---


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.