From f0b1195b4a89a8c1d90ec1c747837d4bc972a824 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Thu, 12 Aug 2021 17:01:49 +0200 Subject: [PATCH] GelfWriter: show error message of exceptions --- lib/perfdata/gelfwriter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/perfdata/gelfwriter.cpp b/lib/perfdata/gelfwriter.cpp index dc9f34f96..f8ebb61d3 100644 --- a/lib/perfdata/gelfwriter.cpp +++ b/lib/perfdata/gelfwriter.cpp @@ -135,10 +135,8 @@ void GelfWriter::AssertOnWorkQueue() void GelfWriter::ExceptionHandler(boost::exception_ptr exp) { - Log(LogCritical, "GelfWriter", "Exception during Graylog Gelf operation: Verify that your backend is operational!"); - - Log(LogDebug, "GelfWriter") - << "Exception during Graylog Gelf operation: " << DiagnosticInformation(std::move(exp)); + Log(LogCritical, "GelfWriter") << "Exception during Graylog Gelf operation: " << DiagnosticInformation(exp, false); + Log(LogDebug, "GelfWriter") << "Exception during Graylog Gelf operation: " << DiagnosticInformation(exp, true); DisconnectInternal(); }