From: Alexander A. Klimov Date: Thu, 21 Feb 2019 09:41:31 +0000 (+0100) Subject: ApiListener: log why bind(2) failed X-Git-Tag: v2.11.0-rc1~174^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5fddaf3ce74d865383462aed035854f8271bbcb;p=icinga2 ApiListener: log why bind(2) failed --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index d56c532bf..4928c285c 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -385,9 +385,9 @@ bool ApiListener::AddListener(const String& node, const String& service) } } } - } catch (const std::exception&) { + } catch (const std::exception& ex) { Log(LogCritical, "ApiListener") - << "Cannot bind TCP socket for host '" << node << "' on port '" << service << "'."; + << "Cannot bind TCP socket for host '" << node << "' on port '" << service << "': " << DiagnosticInformation(ex, false); return false; }