From a6cd3e65cb47b2864a013b4c6a007fbf42f63420 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 23 Apr 2019 14:09:07 +0200 Subject: [PATCH] JsonRpcConnection: reduce log spam on disconnect --- lib/remote/jsonrpcconnection.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index a7ec2cdff..1665f407f 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include using namespace icinga; @@ -63,17 +61,7 @@ void JsonRpcConnection::HandleIncomingMessages(boost::asio::yield_context yc) message = JsonRpc::ReadMessage(m_Stream, yc, m_Endpoint ? -1 : 1024 * 1024); } catch (const std::exception& ex) { if (!m_ShuttingDown) { - auto logLevelOnReadError (LogWarning); - - { - auto boostError (dynamic_cast(&ex)); - - if (boostError && boostError->code().category() == boost::asio::error::get_ssl_category()) { - logLevelOnReadError = LogNotice; - } - } - - Log(logLevelOnReadError, "JsonRpcConnection") + Log(LogNotice, "JsonRpcConnection") << "Error while reading JSON-RPC message for identity '" << m_Identity << "': " << DiagnosticInformation(ex); }