dovecot-1.2: deliver: When logging to syslog, use "dovecot" as i...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 15 19:55:25 EET 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/cf5a467e991c
changeset: 8408:cf5a467e991c
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 15 19:47:46 2008 +0200
description:
deliver: When logging to syslog, use "dovecot" as ident. Add deliver(%u) manually.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/deliver/deliver.c |    7 ++++---

diffs (26 lines):

diff -r 511ceaaa2268 -r cf5a467e991c src/deliver/deliver.c
--- a/src/deliver/deliver.c	Sat Nov 15 19:46:46 2008 +0200
+++ b/src/deliver/deliver.c	Sat Nov 15 19:47:46 2008 +0200
@@ -672,7 +672,7 @@ static void open_logfile(const char *use
 {
 	const char *prefix, *log_path, *stamp;
 
-	prefix = t_strdup_printf("deliver(%s)", username);
+	prefix = t_strdup_printf("deliver(%s): ", username);
 	log_path = getenv("LOG_PATH");
 	if (log_path == NULL || *log_path == '\0') {
 		const char *env = getenv("SYSLOG_FACILITY");
@@ -680,10 +680,11 @@ static void open_logfile(const char *use
 
 		if (env == NULL || !syslog_facility_find(env, &facility))
 			facility = LOG_MAIL;
-		i_set_failure_syslog(prefix, LOG_NDELAY, facility);
+		i_set_failure_prefix(prefix);
+		i_set_failure_syslog("dovecot", LOG_NDELAY, facility);
 	} else {
 		/* log to file or stderr */
-		i_set_failure_file(log_path, t_strconcat(prefix, ": ", NULL));
+		i_set_failure_file(log_path, prefix);
 	}
 
 	log_path = getenv("INFO_LOG_PATH");


More information about the dovecot-cvs mailing list