]> granicus.if.org Git - icinga2/commitdiff
Silence UpdateRepository message errors 5804/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Mon, 27 Nov 2017 11:09:42 +0000 (12:09 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 27 Nov 2017 11:09:42 +0000 (12:09 +0100)
Mixed setups with 2.8 and 2.7 will log this error every time
a new message is received. While this is truly an error,
it just fills the log to infinity. Should be used for debug only.

fixes #5776

lib/remote/jsonrpcconnection.cpp

index 3d9cacaf0c0c55eaef6f6dfffcb15a5dab8b0eff..e6cd9a3c899d5ee1058697c272ff4ac4bcade2de 100644 (file)
@@ -208,11 +208,12 @@ void JsonRpcConnection::MessageHandler(const String& jsonString)
        try {
                ApiFunction::Ptr afunc = ApiFunction::GetByName(method);
 
-               if (!afunc)
-                       Log(LogWarning, "JsonRpcConnection")
+               if (!afunc) {
+                       Log(LogNotice, "JsonRpcConnection")
                            << "Call to non-existent function '" << method << "' from endpoint '" << m_Identity << "'.";
-               else
+               } else {
                        resultMessage->Set("result", afunc->Invoke(origin, message->Get("params")));
+               }
        } catch (const std::exception& ex) {
                /* TODO: Add a user readable error message for the remote caller */
                String diagInfo = DiagnosticInformation(ex);