From c2dadc5f88ba857b0171cf7d545dcbb66b1ee9e8 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 22 May 2014 21:20:18 +0200 Subject: [PATCH] Fix debug output for Api* connection errors. Refs #6070 --- lib/remote/apiclient.cpp | 2 +- lib/remote/apilistener.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index d7e25e6b2..2acb5620e 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -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()); diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index d575855bb..de255f6ec 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -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()); }