From: Timo Sirainen Date: Fri, 3 Dec 2010 07:00:17 +0000 (+0000) Subject: mail storage service: Use ioloop log prefix automation. X-Git-Tag: 2.0.8~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97333cbaa7893be8bac7b5741e328ebfff0aeab0;p=thirdparty%2Fdovecot%2Fcore.git mail storage service: Use ioloop log prefix automation. This properly fixes imap/pop3 when using with client_limit>1. --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index cd99f50d75..3a9db4ef86 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -530,11 +530,16 @@ mail_storage_service_init_log(struct mail_storage_service_ctx *ctx, 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 @@ mail_storage_service_init(struct master_service *service, 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;