Improve logs

This commit is contained in:
Mattia Codato 2020-07-13 17:06:08 +02:00
parent a3027d7177
commit 134a43d48a
1 changed files with 4 additions and 3 deletions

View File

@ -102,7 +102,7 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
Host::Ptr host = Host::GetByName(params->Get("host")); Host::Ptr host = Host::GetByName(params->Get("host"));
if (!host) { if (!host) {
Log(LogCritical, "ApiListener", "Host not found."); Log(LogCritical, "ApiListener") << "Host '" << params->Get("host") << "' not found.";
return; return;
} }
@ -113,7 +113,8 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
checkable = host; checkable = host;
if (!checkable) { if (!checkable) {
Log(LogCritical, "ApiListener", "Checkable not found."); Log(LogCritical, "ApiListener") << "Checkable '" << params->Get("host")
<< " " << params->Get("service") << "' not found.";
return; return;
} }
@ -176,7 +177,7 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
} }
}; };
} }
if (!listener->GetAcceptCommands()) { if (!listener->GetAcceptCommands()) {
Log(LogWarning, "ApiListener") Log(LogWarning, "ApiListener")
<< "Ignoring command. '" << listener->GetName() << "' does not accept commands."; << "Ignoring command. '" << listener->GetName() << "' does not accept commands.";