[exim-dev] [Bug 486] Monthly datestamped log files

Top Pagina
Delete this message
Reply to this message
Auteur: Simon Arlott
Datum:  
Aan: exim-dev
Onderwerp: [exim-dev] [Bug 486] Monthly datestamped log files
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=486

Simon Arlott <bugzilla.exim.simon@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla.exim.simon@???
                   |                            |rg





--- Comment #4 from Simon Arlott <bugzilla.exim.simon@???> 2009-03-08 13:28:15 ---
(In reply to comment #3)
> Should only allow for %M or %D, not both.


It doesn't allow both; I tested it with both to see what would happen.

> tod_stamp(int type) function in tod.c needs to be updated to include a monthly
> todstamp as calling a monthly log file yyyymmDD is questionable. The DD part is


That's what my patch does...

> irrelevant. line 1543 in src/expand.c - case vtype_todlf needs to be duplicated
> with a new type to correctly deal with tod_stamp calls.


The documentation explicitly states that this uses %D, I don't think there's a
need to add a %M version.

> Documentation needs updating.


Ok.

> Perhaps instead it should allow for the full strftime so log files can be named
> whatever people want them to be rather than limiting to only 2 of the formats.


I could have a look at doing that as exim already uses strftime for tod_bsdin
(for some reason tod_log_datestamp doesn't use it). This would make automatic
renaming of the panic log much more difficult (perhaps impossible) and really
complicate the meaning tod_logfile and the existing usage of %D.

An extra format for monthly logs is all I need; no one has requested fully
flexible strftime naming.

> To quote the docs on panic "The location of the panic log is also determined by
> log_file_path, but it is not datestamped, because rotation of the panic log
> does not make sense".


This behaviour is kept.

> As a side - most systems now come with logrotated or something similar. Is log
> file management really something that should still be in exim?


Log file name management is not something that should be in logrotated. It's
flawed because it requires moving files that could be actively in use. Writing
to the current file works much better, but the per-day option creates too many
files for me. These are then easily compressed after the end of the month.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email