]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Use master_service_init_log_with_pid() where possible
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Apr 2020 18:32:32 +0000 (21:32 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Apr 2020 10:42:00 +0000 (10:42 +0000)
src/auth/main.c
src/dict/main.c
src/imap-urlauth/imap-urlauth-worker.c
src/lmtp/main.c

index 8ea6d6e96b2f7a7d4fe63741d52f02c086c5e862..ad91f8bd3630d37dae4873cf4f63edf4291c0cbd 100644 (file)
@@ -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:
index 469f85ccc5cd15d9b7b526495a6c80f37d9f0d76..2e7ea71c269f87cef19aad13da5b932e105f9768 100644 (file)
@@ -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);
 
index 1c505b016c682dbe2c693c1794091a823e19eb20..f61a23b770d25dc668b67fed3de31528d0838f9d 100644 (file)
@@ -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 =
index c5574e6cff53f0acf03a9d35fe66d8fa12ae43e7..d72f70a62626c52a357623990cb7d63f9f8070ed 100644 (file)
@@ -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);