From 9dd904942ac3db6e4acdb5d4b8063a8699f57733 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 4 Feb 2014 10:54:38 +0100 Subject: [PATCH] Compat: Fix notification type string. Fixes #5420 --- components/compat/compatlogger.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/compat/compatlogger.cpp b/components/compat/compatlogger.cpp index ee587b5fb..2df327c07 100644 --- a/components/compat/compatlogger.cpp +++ b/components/compat/compatlogger.cpp @@ -243,6 +243,10 @@ void CompatLogger::NotificationSentHandler(const Notification::Ptr& notification String notification_type_str = Notification::NotificationTypeToString(notification_type); + /* override problem notifications with their current state string */ + if (notification_type == NotificationProblem) + notification_type_str = Service::StateToString(service->GetState()); + String author_comment = ""; if (notification_type == NotificationCustom || notification_type == NotificationAcknowledgement) { author_comment = author + ";" + comment_text; @@ -260,8 +264,7 @@ void CompatLogger::NotificationSentHandler(const Notification::Ptr& notification << user->GetName() << ";" << host->GetName() << ";" << service->GetShortName() << ";" - << notification_type_str << " " - << "(" << Service::StateToString(service->GetState()) << ");" + << notification_type_str << ";" << command_name << ";" << output << ";" << author_comment -- 2.40.0