mirror of https://github.com/Icinga/icinga2.git
ApiListener: Log error context only once
When logging at the warning level, the logger will automatically look up for registered context and append them to the log entry accordingly.
This commit is contained in:
parent
92399a9d9c
commit
8574357443
|
@ -1554,7 +1554,7 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client)
|
||||||
count++;
|
count++;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
Log(LogWarning, "ApiListener")
|
Log(LogWarning, "ApiListener")
|
||||||
<< "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex, false);
|
<< "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << ex.what();
|
||||||
|
|
||||||
Log(LogDebug, "ApiListener")
|
Log(LogDebug, "ApiListener")
|
||||||
<< "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
|
<< "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
|
||||||
|
|
Loading…
Reference in New Issue