From: Vsevolod Stakhov Date: Fri, 11 May 2018 16:58:30 +0000 (+0100) Subject: [Minor] Improve fuzzy errors logging X-Git-Tag: 1.7.5~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f2856b8a829e761e8c1774685b4e6b7a1f73b40f;p=rspamd.git [Minor] Improve fuzzy errors logging --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 41b175dae..73c122a0f 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2166,7 +2166,7 @@ fuzzy_check_io_callback (gint fd, short what, void *arg) /* Error state */ msg_err_task ("got error on IO with server %s(%s), on %s, %d, %s", rspamd_upstream_name (session->server), - rspamd_inet_address_to_string (session->addr), + rspamd_inet_address_to_string_pretty (session->addr), session->state == 1 ? "read" : "write", errno, strerror (errno)); @@ -2207,7 +2207,7 @@ fuzzy_check_timer_callback (gint fd, short what, void *arg) if (session->retransmits >= fuzzy_module_ctx->retransmits) { msg_err_task ("got IO timeout with server %s(%s), after %d retransmits", rspamd_upstream_name (session->server), - rspamd_inet_address_to_string (session->addr), + rspamd_inet_address_to_string_pretty (session->addr), session->retransmits); rspamd_upstream_fail (session->server); rspamd_session_remove_event (session->task->s, fuzzy_io_fin, session); @@ -2412,7 +2412,7 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg) else if (ret == return_error) { msg_err_task ("got error in IO with server %s(%s), %d, %s", rspamd_upstream_name (session->server), - rspamd_inet_address_to_string (session->addr), + rspamd_inet_address_to_string_pretty (session->addr), errno, strerror (errno)); rspamd_upstream_fail (session->server); } @@ -2515,7 +2515,7 @@ fuzzy_controller_timer_callback (gint fd, short what, void *arg) msg_err_task_check ("got IO timeout with server %s(%s), " "after %d retransmits", rspamd_upstream_name (session->server), - rspamd_inet_address_to_string (session->addr), + rspamd_inet_address_to_string_pretty (session->addr), session->retransmits); if (session->session) { @@ -2830,7 +2830,7 @@ register_fuzzy_client_call (struct rspamd_task *task, if ((sock = rspamd_inet_address_connect (addr, SOCK_DGRAM, TRUE)) == -1) { msg_warn_task ("cannot connect to %s(%s), %d, %s", rspamd_upstream_name (selected), - rspamd_inet_address_to_string (addr), + rspamd_inet_address_to_string_pretty (addr), errno, strerror (errno)); rspamd_upstream_fail (selected);