From: Vsevolod Stakhov Date: Mon, 15 May 2017 14:02:23 +0000 (+0100) Subject: [Minor] Improve logging of errors X-Git-Tag: 1.5.8~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8f633248e0a20225f46abb0a5ad502a077f1a7e6;p=rspamd.git [Minor] Improve logging of errors --- diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 7a5c73783..54988cf49 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -974,8 +974,9 @@ rspamd_inet_address_connect (const rspamd_inet_addr_t *addr, gint type, if (r == -1) { if (!async || errno != EINPROGRESS) { close (fd); - msg_warn ("connect failed: %d, '%s'", errno, - strerror (errno)); + msg_warn ("connect %s failed: %d, '%s'", + rspamd_inet_address_to_string_pretty (addr), + errno, strerror (errno)); return -1; } } @@ -1031,8 +1032,10 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type, if (r == -1) { if (!async || errno != EINPROGRESS) { close (fd); - msg_warn ("bind failed: %d, '%s'", errno, - strerror (errno)); + msg_warn ("bind %s failed: %d, '%s'", + rspamd_inet_address_to_string_pretty (addr), + errno, + strerror (errno)); return -1; } } @@ -1059,7 +1062,9 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type, r = listen (fd, -1); if (r == -1) { - msg_warn ("listen failed: %d, '%s'", errno, strerror (errno)); + msg_warn ("listen %s failed: %d, '%s'", + rspamd_inet_address_to_string_pretty (addr), + errno, strerror (errno)); close (fd); return -1; }