From: Timo Sirainen Date: Sat, 15 Nov 2008 17:47:46 +0000 (+0200) Subject: deliver: When logging to syslog, use "dovecot" as ident. Add deliver(%u) manually. X-Git-Tag: 1.2.alpha4~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d93c5cd48cc753a3fbd294250861c228e0a1ecbe;p=thirdparty%2Fdovecot%2Fcore.git deliver: When logging to syslog, use "dovecot" as ident. Add deliver(%u) manually. --HG-- branch : HEAD --- diff --git a/src/deliver/deliver.c b/src/deliver/deliver.c index ef803d207f..216eb64010 100644 --- a/src/deliver/deliver.c +++ b/src/deliver/deliver.c @@ -672,7 +672,7 @@ static void open_logfile(const char *username) { 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 *username) 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");