]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add PID to the default log prefix
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 3 Feb 2021 18:35:02 +0000 (20:35 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 24 Feb 2021 17:19:49 +0000 (17:19 +0000)
src/lib-storage/mail-storage-service.c

index 1599267908d24091b035c50a7f7d7a255f55d1c4..85c3d81dfcd6d9b8b90428e7d4f7339d1f38a612 100644 (file)
@@ -997,8 +997,8 @@ mail_storage_service_init(struct master_service *service,
                   may still be going to wrong location */
                const char *configured_name =
                        master_service_get_configured_name(service);
-               ctx->default_log_prefix =
-                       p_strconcat(pool, configured_name, ": ", NULL);
+               ctx->default_log_prefix = p_strdup_printf(pool,
+                       "%s(%s): ", configured_name, my_pid);
                master_service_init_log_with_prefix(service, ctx->default_log_prefix);
        }
        dict_drivers_register_builtin();
@@ -1269,7 +1269,7 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
                        master_service_get_configured_name(ctx->service);
                ctx->log_initialized = TRUE;
                master_service_init_log_with_prefix(ctx->service,
-                       t_strconcat(configured_name, ": ", NULL));
+                       t_strdup_printf("%s(%s): ", configured_name, my_pid));
                update_log_prefix = TRUE;
        }
        sets = master_service_settings_parser_get_others(master_service,