[Home]

Summary:ASTERISK-07808: [patch] Add option to logger to rename log files with timestamp
Reporter:jmls (jmls)Labels:
Date Opened:2006-09-24 02:45:51Date Closed:2006-10-02 12:54:49
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) logger2.diff
( 1) logger3.diff
Description:When doing a logger rotate, this simple patch allows you to specify that you want the log file renaming with a timestamp instead of a sequence (e.g. queue_log.1159083226 instead of queue_log.1)

This is better for us as our external log analyser programs can now easily determine if they have already processed this file by using the filename as a key rather than relying on the date / time the file was created.

****** ADDITIONAL INFORMATION ******

I have tested this on 1.4 beta2 svn. debug, event_log, messages and queue all get rotated with a timestamp if the new option is specified
Comments:By: Serge Vecher (serge-v) 2006-09-25 08:28:17

jmls: nice patch!
1) I do believe this would be considered a "new feature", so switching this to trunk.
2) Need some spaces in this line:
(x=0;;x++)

By: jmls (jmls) 2006-09-25 10:01:36

the (x=0;;x++) was in the original file, I merely indented it. However, have updated as you suggested. Logger2.diff is the new patch

By: jmls (jmls) 2006-09-25 12:31:17

I agree that it is a new feature, but as it doesn't affect or require any structure changes and 1.4 hasn't been released as a fcs, and it is a simple patch and it is simple to check, would you reconsider including it in 1.4 ? I wouldn't want to have to keep patching my systems until 1.6 came out :)

By: jmls (jmls) 2006-10-01 12:37:15

any chance of this being considered for 1.4 ?

By: jmls (jmls) 2006-10-02 12:44:51

diff against svn trunk attached as logger3.diff

By: Joshua C. Colp (jcolp) 2006-10-02 12:54:49

Put into trunk as of revision 44172. Thanks!