From: Stephan Bosch Date: Thu, 9 Apr 2020 08:37:28 +0000 (+0200) Subject: lib-smtp: test-smtp-submit - Add log prefixes to distinguish client and server debug... X-Git-Tag: 2.3.13~621 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=945ce4e1526f3af85fcd3a0928d05d2b89dbe3db;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: test-smtp-submit - Add log prefixes to distinguish client and server debug messages. --- diff --git a/src/lib-smtp/test-smtp-submit.c b/src/lib-smtp/test-smtp-submit.c index 6f725a2ead..5be90843cb 100644 --- a/src/lib-smtp/test-smtp-submit.c +++ b/src/lib-smtp/test-smtp-submit.c @@ -2112,11 +2112,10 @@ test_run_client_server(const struct smtp_submit_settings *submit_set, io_loop_destroy(&ioloop); } lib_signals_deinit(); - if (debug) { - i_debug("server[%d]: PID=%s", - i + 1, my_pid); - } /* child: server */ + i_set_failure_prefix("SERVER[%u]: ", i + 1); + if (debug) + i_debug("PID=%s", my_pid); ioloop = io_loop_create(); server_test(i); io_loop_destroy(&ioloop); @@ -2134,13 +2133,13 @@ test_run_client_server(const struct smtp_submit_settings *submit_set, if (fd_listen != -1) i_close_fd(&fd_listen); } - if (debug) - i_debug("client: PID=%s", my_pid); - lib_signals_ioloop_attach(); } /* parent: client */ + i_set_failure_prefix("CLIENT: "); + if (debug) + i_debug("PID=%s", my_pid); i_sleep_msecs(100); /* wait a little for server setup */ server_port = 0; @@ -2151,6 +2150,7 @@ test_run_client_server(const struct smtp_submit_settings *submit_set, test_client_deinit(); io_loop_destroy(&ioloop); + i_unset_failure_prefix(); test_servers_kill_all(); i_free(server_pids); i_free(bind_ports);