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;
}
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;