dovecot-2.0: mail storage service: Use ioloop log prefix automat...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Dec 3 09:00:20 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/1d1cd60d5429
changeset: 12498:1d1cd60d5429
user: Timo Sirainen <tss at iki.fi>
date: Fri Dec 03 07:00:17 2010 +0000
description:
mail storage service: Use ioloop log prefix automation.
This properly fixes imap/pop3 when using with client_limit>1.
diffstat:
src/lib-storage/mail-storage-service.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 1bac1c09201a -r 1d1cd60d5429 src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c Fri Dec 03 06:58:38 2010 +0000
+++ b/src/lib-storage/mail-storage-service.c Fri Dec 03 07:00:17 2010 +0000
@@ -530,11 +530,16 @@
ctx->log_initialized = TRUE;
T_BEGIN {
string_t *str;
+ struct ioloop_log *log;
str = t_str_new(256);
var_expand(str, user->user_set->mail_log_prefix,
get_var_expand_table(ctx->service, &user->input));
master_service_init_log(ctx->service, str_c(str));
+
+ log = io_loop_log_new(current_ioloop);
+ io_loop_log_set_prefix(log, str_c(str));
+ io_loop_log_unref(&log);
} T_END;
}
@@ -611,8 +616,10 @@
if ((flags & MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT) == 0) {
/* note: we may not have read any settings yet, so this logging
may still be going to wrong location */
- master_service_init_log(service,
- t_strconcat(service->name, ": ", NULL));
+ const char *log_prefix = t_strconcat(service->name, ": ", NULL);
+
+ master_service_init_log(service, log_prefix);
+ io_loop_set_default_log_prefix(current_ioloop, log_prefix);
}
dict_drivers_register_builtin();
return ctx;
More information about the dovecot-cvs
mailing list