From c2abb0c9dc07e0abb78e940359b511293762cb1e 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 73f4457bc..14b149c82 100644 --- a/lib/perfdata/gelfwriter.cpp +++ b/lib/perfdata/gelfwriter.cpp @@ -126,10 +126,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(); }