Implement %M datestamping in log filenames.
[exim.git] / doc / doc-docbook / spec.xfpt
index b75e36ba4ba6540491ea1a3211b6db1f27fc4d63..bc9dd2e145442ab1f7e77a06be4a7377ef8cd414 100644 (file)
@@ -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"