X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/76aa570c217ad2fad1e73fb91e2aa39ce5e3c4ff..f1e5fef536bdc2c5d84c4bc7852d6e948253ccaf:/src/src/log.c diff --git a/src/src/log.c b/src/src/log.c index 67a3d8543..0995621ac 100644 --- a/src/src/log.c +++ b/src/src/log.c @@ -255,11 +255,12 @@ if (type == lt_process) /* The names of the other three logs are controlled by file_path. The panic log is written to the same directory as the main and reject logs, but its name does -not have a datestamp. The use of datestamps is indicated by %D in file_path. -When opening the panic log, if %D is present, we remove the datestamp from the -generated name; if it is at the start, remove a following non-alphameric -character as well; otherwise, remove a preceding non-alphameric character. This -is definitely kludgy, but it sort of does what people want, I hope. */ +not have a datestamp. The use of datestamps is indicated by %D/%M in file_path. +When opening the panic log, if %D or %M is present, we remove the datestamp +from the generated name; if it is at the start, remove a following +non-alphanumeric character as well; otherwise, remove a preceding +non-alphanumeric character. This is definitely kludgy, but it sort of does what +people want, I hope. */ else { @@ -307,7 +308,7 @@ else else if (string_datestamp_offset >= 0) { uschar *from = buffer + string_datestamp_offset; - uschar *to = from + Ustrlen(tod_stamp(tod_log_datestamp)); + uschar *to = from + string_datestamp_length; if (from == buffer || from[-1] == '/') { if (!isalnum(*to)) to++; @@ -858,7 +859,7 @@ if ((flags & LOG_MAIN) != 0 && if (mainlog_datestamp != NULL) { - uschar *nowstamp = tod_stamp(tod_log_datestamp); + uschar *nowstamp = tod_stamp(string_datestamp_type); if (Ustrncmp (mainlog_datestamp, nowstamp, Ustrlen(nowstamp)) != 0) { (void)close(mainlogfd); /* Close the file */ @@ -981,7 +982,7 @@ if ((flags & LOG_REJECT) != 0) if (rejectlog_datestamp != NULL) { - uschar *nowstamp = tod_stamp(tod_log_datestamp); + uschar *nowstamp = tod_stamp(string_datestamp_type); if (Ustrncmp (rejectlog_datestamp, nowstamp, Ustrlen(nowstamp)) != 0) { (void)close(rejectlogfd); /* Close the file */