Bug 97790 - logrotate extension doesn't do anything
Summary: logrotate extension doesn't do anything
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Jay Turner
Depends On:
TreeView+ depends on / blocked
Reported: 2003-06-21 05:27 UTC by Marcus Leonard
Modified: 2015-01-08 00:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-07-09 19:38:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Marcus Leonard 2003-06-21 05:27:51 UTC
Description of problem:
"extension" in logrotate.conf doesn't do anything!

Can't change the rotated log extension no matter what I try:
extension .fred
extension fred
extension `date +%Y-%m-%d_%H%M`
You name it, I've tried it...

Version-Release number of selected component (if applicable):

How reproducible:
Run logrotate with "extension" line in logrotate.conf

Steps to Reproduce:
1. Config logrotate.conf with line "extension <ext>"
2. Run logrotate.conf -f
3. Be depressed.
Actual results:
Same output as if not using the "extension" line.

Expected results:
A different file extension.

Additional info:
Would really like to date-stamp the rotated log files (using logrotate, since
man logrotate indicates one can customize the extension).

Comment 1 Elliot Lee 2003-07-09 19:38:43 UTC
extension is used for a different purpose than it appears. It is useful when you have a 
logfile named something like mylog.fred and want to rotate it to mylog.1.fred.gz instead of 
mylog.fred.1.gz. Very boring, really.

Datestamping would not work anyways because logrotate needs to be able to figure out 
the base part of the filename in order to know which files to rotate, and your particular 
method of datestamping (using shell backticks) won't currently work because logrotate 
(like most programs) does not evaluate the extension value in the shell.

But, you're welcome to come up with a patch to add the new functionality :)

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