From: Timo Sirainen Date: Mon, 20 Apr 2020 18:32:32 +0000 (+0300) Subject: global: Use master_service_init_log_with_pid() where possible X-Git-Tag: 2.3.11.2~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f28ff571949032bd4c5f059b34890115dc4557d;p=thirdparty%2Fdovecot%2Fcore.git global: Use master_service_init_log_with_pid() where possible --- diff --git a/src/auth/main.c b/src/auth/main.c index 8ea6d6e96b..ad91f8bd36 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -9,7 +9,6 @@ #include "child-wait.h" #include "sql-api.h" #include "module-dir.h" -#include "hostpid.h" #include "randgen.h" #include "process-title.h" #include "settings-parser.h" @@ -379,8 +378,7 @@ int main(int argc, char *argv[]) while ((c = master_getopt(master_service)) > 0) { switch (c) { case 'w': - master_service_init_log(master_service, - t_strdup_printf("auth-worker(%s): ", my_pid)); + master_service_init_log_with_pid(master_service); worker = TRUE; break; default: diff --git a/src/dict/main.c b/src/dict/main.c index 469f85ccc5..2e7ea71c26 100644 --- a/src/dict/main.c +++ b/src/dict/main.c @@ -5,7 +5,6 @@ #include "ioloop.h" #include "randgen.h" #include "str.h" -#include "hostpid.h" #include "stats-dist.h" #include "process-title.h" #include "env-util.h" @@ -162,7 +161,7 @@ int main(int argc, char *argv[]) &error) < 0) i_fatal("Error reading configuration: %s", error); - master_service_init_log(master_service, t_strdup_printf("dict(%s): ", my_pid)); + master_service_init_log_with_pid(master_service); main_preinit(); master_service_set_die_callback(master_service, dict_die); diff --git a/src/imap-urlauth/imap-urlauth-worker.c b/src/imap-urlauth/imap-urlauth-worker.c index 1c505b016c..f61a23b770 100644 --- a/src/imap-urlauth/imap-urlauth-worker.c +++ b/src/imap-urlauth/imap-urlauth-worker.c @@ -997,8 +997,7 @@ int main(int argc, char *argv[]) i_fatal_status(EX_USAGE, "Unknown argument: %s", argv[optind]); } - master_service_init_log(master_service, - t_strdup_printf("imap-urlauth[%s]: ", my_pid)); + master_service_init_log_with_pid(master_service); master_service_set_die_callback(master_service, imap_urlauth_worker_die); storage_service = diff --git a/src/lmtp/main.c b/src/lmtp/main.c index c5574e6cff..d72f70a626 100644 --- a/src/lmtp/main.c +++ b/src/lmtp/main.c @@ -2,7 +2,6 @@ #include "lmtp-common.h" #include "ioloop.h" -#include "hostpid.h" #include "path-util.h" #include "restrict-access.h" #include "anvil-client.h" @@ -158,8 +157,7 @@ int main(int argc, char *argv[]) base_dir = i_strdup(tmp_base_dir); drop_privileges(); - master_service_init_log(master_service, - t_strdup_printf("lmtp(%s): ", my_pid)); + master_service_init_log_with_pid(master_service); storage_service = mail_storage_service_init(master_service, set_roots, storage_service_flags);