From: Alexander A. Klimov Date: Tue, 23 Apr 2019 12:09:07 +0000 (+0200) Subject: JsonRpcConnection: reduce log spam on disconnect X-Git-Tag: v2.11.0-rc1~139^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F7137%2Fhead;p=icinga2 JsonRpcConnection: reduce log spam on disconnect --- 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); }