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/doc-docbook | |
parent | 76aa570c217ad2fad1e73fb91e2aa39ce5e3c4ff (diff) |
Implement %M datestamping in log filenames.
Patch from Simon Arlott.
fixes bug 486
Diffstat (limited to 'doc/doc-docbook')
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 28 |
1 files changed, 18 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" |