diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-15 15:02:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-15 15:02:23 +0100 |
commit | e869df63e92c8e1730995d5537c6bb5191eeed9b (patch) | |
tree | 0ccc5176576b315147202aae4a57d36a0470884e /src | |
parent | 7d750e372b0e5859784e4a162992fb1b3cfaf97f (diff) | |
download | rspamd-e869df63e92c8e1730995d5537c6bb5191eeed9b.tar.gz rspamd-e869df63e92c8e1730995d5537c6bb5191eeed9b.zip |
[Minor] Improve logging of errors
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/addr.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 5ef5c9dc0..5a1e9cf6e 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -947,8 +947,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; } } @@ -1004,8 +1005,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; } } @@ -1032,7 +1035,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; } |