Bug 81819 - Create logfilename with date
Summary: Create logfilename with date
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: logrotate
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-14 07:39 UTC by Ingo Schramme
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 19:41:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ingo Schramme 2003-01-14 07:39:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)

Description of problem:
If you want to add the date to the name of the logifle, something like 

extension `date '+%b%d%Y'` 

doesn't work. Anything in this direction would be great...

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


How reproducible:
Always

Steps to Reproduce:
1. add "extension `date '+%b%d%Y'`" to conf file
2. the result logfile name ist "logfile-`date '+%b%d%Y'`.1.log

    

Additional info:

Comment 1 Martin Lohmeier 2003-01-14 12:39:17 UTC
An other way to solve this problem, is to add a new option, like "date" and
"dateformat:

/var/log/messages {
     rotate 5
     weekly
     date
     dateformat "yyyy-mm-dd"
     postrotate
         /sbin/killall -HUP syslogd
     endscript
}

Comment 2 Elliot Lee 2003-01-14 19:41:07 UTC
Taking patches, but not planning to do much more than that at this point.

Comment 3 Need Real Name 2005-01-12 08:09:20 UTC
Bug 108775 has a patch for something similar.


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