Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8408:cf5a467e991c HEAD
deliver: When logging to syslog, use "dovecot" as ident. Add deliver(%u) manually.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 15 Nov 2008 19:47:46 +0200 |
parents | 511ceaaa2268 |
children | 97f7b15f7d44 |
files | src/deliver/deliver.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ { 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 @@ 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");