dovecot-2.2: lib-master: Get log timestamp prefix from LOG_STDER...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 11 14:40:51 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/13021170e269
changeset: 18320:13021170e269
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 11 13:27:49 2015 +0200
description:
lib-master: Get log timestamp prefix from LOG_STDERR_TIMESTAMP environment.

diffstat:

 src/lib-master/master-service.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r fa42da3cc614 -r 13021170e269 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c	Mon Mar 09 21:27:51 2015 +0200
+++ b/src/lib-master/master-service.c	Wed Mar 11 13:27:49 2015 +0200
@@ -262,10 +262,13 @@
 void master_service_init_log(struct master_service *service,
 			     const char *prefix)
 {
-	const char *path;
+	const char *path, *timestamp;
 
 	if ((service->flags & MASTER_SERVICE_FLAG_STANDALONE) != 0 &&
 	    (service->flags & MASTER_SERVICE_FLAG_DONT_LOG_TO_STDERR) == 0) {
+		timestamp = getenv("LOG_STDERR_TIMESTAMP");
+		if (timestamp != NULL)
+			i_set_failure_timestamp_format(timestamp);
 		i_set_failure_file("/dev/stderr", "");
 		return;
 	}


More information about the dovecot-cvs mailing list