diff options
author | Phil Pennock <pdp@exim.org> | 2011-02-13 00:31:49 -0500 |
---|---|---|
committer | Phil Pennock <pdp@exim.org> | 2011-02-13 00:31:49 -0500 |
commit | f1e5fef536bdc2c5d84c4bc7852d6e948253ccaf (patch) | |
tree | e9e7bc57677daa24a953f316dcfe897616450fc5 /doc | |
parent | 76aa570c217ad2fad1e73fb91e2aa39ce5e3c4ff (diff) |
Implement %M datestamping in log filenames.
Patch from Simon Arlott.
fixes bug 486
Diffstat (limited to 'doc')
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 28 | ||||
-rw-r--r-- | doc/doc-txt/ChangeLog | 3 | ||||
-rw-r--r-- | doc/doc-txt/NewStuff | 3 |
3 files changed, 24 insertions, 10 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index b75e36ba4..bc9dd2e14 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -32110,8 +32110,10 @@ log_file_path = $spool_directory/log/%slog If you do not specify anything at build time or run time, that is where the logs are written. -A log file path may also contain &`%D`& if datestamped log file names are in -use &-- see section &<<SECTdatlogfil>>& below. +.new +A log file path may also contain &`%D`& or &`%M`& if datestamped log file names +are in use &-- see section &<<SECTdatlogfil>>& below. +.wen Here are some examples of possible settings: .display @@ -32151,18 +32153,20 @@ renamed. +.new .section "Datestamped log files" "SECTdatlogfil" .cindex "log" "datestamped files" Instead of cycling the main and reject log files by renaming them periodically, some sites like to use files whose names contain a datestamp, -for example, &_mainlog-20031225_&. The datestamp is in the form &_yyyymmdd_&. -Exim has support for this way of working. It is enabled by setting the -&%log_file_path%& option to a path that includes &`%D`& at the point where the -datestamp is required. For example: +for example, &_mainlog-20031225_&. The datestamp is in the form &_yyyymmdd_& or +&_yyyymm_&. Exim has support for this way of working. It is enabled by setting +the &%log_file_path%& option to a path that includes &`%D`& or &`%M`& at the +point where the datestamp is required. For example: .code log_file_path = /var/spool/exim/log/%slog-%D log_file_path = /var/log/exim-%s-%D.log log_file_path = /var/spool/exim/log/%D-%slog +log_file_path = /var/log/exim/%s.%M .endd As before, &`%s`& is replaced by &"main"& or &"reject"&; the following are examples of names generated by the above examples: @@ -32170,6 +32174,7 @@ examples of names generated by the above examples: /var/spool/exim/log/mainlog-20021225 /var/log/exim-reject-20021225.log /var/spool/exim/log/20021225-mainlog +/var/log/exim/main.200212 .endd When this form of log file is specified, Exim automatically switches to new files at midnight. It does not make any attempt to compress old logs; you @@ -32178,15 +32183,18 @@ run &'exicyclog'& with this form of logging. 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. -When generating the name of the panic log, &`%D`& is removed from the string. -In addition, if it immediately follows a slash, a following non-alphanumeric -character is removed; otherwise a preceding non-alphanumeric character is -removed. Thus, the three examples above would give these panic log names: +When generating the name of the panic log, &`%D`& or &`%M`& are removed from +the string. In addition, if it immediately follows a slash, a following +non-alphanumeric character is removed; otherwise a preceding non-alphanumeric +character is removed. Thus, the four examples above would give these panic +log names: .code /var/spool/exim/log/paniclog /var/log/exim-panic.log /var/spool/exim/log/paniclog +/var/log/exim/panic .endd +.wen .section "Logging to syslog" "SECID249" diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 439e80aba..63a73c9bb 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -48,6 +48,9 @@ PP/07 Bugzilla 1061: restrict error messages sent over SMTP to not reveal SQL string expansion failure details. Patch from Andrey Oktyabrski. +PP/08 Bugzilla 486: implement %M datestamping in log filenames. + Patch from Simon Arlott. + Exim version 4.74 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 46fd6c4d8..6159bf443 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -22,6 +22,9 @@ Version 4.75 false. When true, if the external delivery command exits on a signal then Exim will freeze the message in the queue, instead of generating a bounce. + 3. Log filenames may now use %M as an escape, instead of %D (still available). + The %M pattern expands to yyyymm, providing month-level resolution. + Version 4.74 ------------ |