From: Timo Sirainen Date: Mon, 20 Apr 2020 18:41:05 +0000 (+0300) Subject: lib-master: Add master_service_init_log_with_prefix() X-Git-Tag: 2.3.11.2~184 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e45344896dda2e82a7c298aafcd9730cd6e473c0;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Add master_service_init_log_with_prefix() --- diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index fd4a61c82e..07c4a9c4b5 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -505,6 +505,12 @@ master_service_try_init_log(struct master_service *service, void master_service_init_log(struct master_service *service, const char *prefix) +{ + master_service_init_log_with_prefix(service, prefix); +} + +void master_service_init_log_with_prefix(struct master_service *service, + const char *prefix) { if (service->log_initialized) { /* change only the prefix */ diff --git a/src/lib-master/master-service.h b/src/lib-master/master-service.h index b8f9904873..7d19604a42 100644 --- a/src/lib-master/master-service.h +++ b/src/lib-master/master-service.h @@ -131,6 +131,9 @@ void master_service_env_clean(void); functions. The following calls change the log prefix. */ void master_service_init_log(struct master_service *service, const char *prefix); +/* Initialize/change log prefix to the given log prefix. */ +void master_service_init_log_with_prefix(struct master_service *service, + const char *prefix); /* Initialize/change log prefix to "configured_name(my_pid): " */ void master_service_init_log_with_pid(struct master_service *service); /* Initialize stats client (if it's not already initialized). This is called