]> granicus.if.org Git - icinga2/commitdiff
Fix debug output for Api* connection errors.
authorMichael Friedrich <Michael.Friedrich@netways.de>
Thu, 22 May 2014 19:20:18 +0000 (21:20 +0200)
committerMichael Friedrich <Michael.Friedrich@netways.de>
Thu, 22 May 2014 19:20:18 +0000 (21:20 +0200)
Refs #6070

lib/remote/apiclient.cpp
lib/remote/apilistener.cpp

index d7e25e6b25dc87467ef3cca341ea81b42e630abe..2acb5620e1a0f7959ee3d6098d3ffcdf76c38a2d 100644 (file)
@@ -87,7 +87,7 @@ void ApiClient::SendMessage(const Dictionary::Ptr& message)
        } catch (const std::exception& ex) {
                std::ostringstream info, debug;
                info << "Error while sending JSON-RPC message for identity '" << m_Identity << "'";
-               debug << info << std::endl << DiagnosticInformation(ex);
+               debug << info.str() << std::endl << DiagnosticInformation(ex);
                Log(LogWarning, "remote", info.str());
                Log(LogDebug, "remote", debug.str());
 
index d575855bb47e5d0f0812f2d0fb187b25fd553eb8..de255f6ec352a44e44ae5783dba1b002c6478220 100644 (file)
@@ -182,7 +182,7 @@ void ApiListener::AddConnection(const String& node, const String& service)
        } catch (const std::exception& ex) {
                std::ostringstream info, debug;
                info << "Cannot connect to host '" << node << "' on port '" << service << "'";
-               debug << info << std::endl << DiagnosticInformation(ex);
+               debug << info.str() << std::endl << DiagnosticInformation(ex);
                Log(LogCritical, "remote", info.str());
                Log(LogDebug, "remote", debug.str());
        }