Mercurial > dovecot > core-2.2
changeset 12498:1d1cd60d5429
mail storage service: Use ioloop log prefix automation.
This properly fixes imap/pop3 when using with client_limit>1.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 03 Dec 2010 07:00:17 +0000 |
parents | 1bac1c09201a |
children | 23eb7ec9c37d |
files | src/lib-storage/mail-storage-service.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;