[icinga-checkins] icinga.org: icinga2/master: Add the notification type into the log message

git at icinga.org git at icinga.org
Wed Aug 3 17:33:23 CEST 2016


Module: icinga2
Branch: master
Commit: 83f07c7ee2624b227f42120642167cc9fe43ec6b
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=83f07c7ee2624b227f42120642167cc9fe43ec6b

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Aug  3 17:32:55 2016 +0200

Add the notification type into the log message

fixes #12304

---

 lib/icinga/notification.cpp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp
index d989776..41a6cf4 100644
--- a/lib/icinga/notification.cpp
+++ b/lib/icinga/notification.cpp
@@ -397,7 +397,8 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 		}
 
 		Log(LogInformation, "Notification")
-		    << "Sending notification '" << GetName() << "' for user '" << userName << "'";
+		    << "Sending '" << NotificationTypeToStringInternal(type) << "' notification '"
+		    << GetName() << " for user '" << userName << "'";
 
 		Utility::QueueAsyncCallback(boost::bind(&Notification::ExecuteNotificationHelper, this, type, user, cr, force, author, text));
 
@@ -500,7 +501,8 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
 		Service::OnNotificationSentToUser(this, GetCheckable(), user, type, cr, author, text, command->GetName(), MessageOrigin::Ptr());
 
 		Log(LogInformation, "Notification")
-		    << "Completed sending notification '" << GetName()
+		    << "Completed sending '" << NotificationTypeToStringInternal(type)
+		    << "' notification '" << GetName()
 		    << "' for checkable '" << GetCheckable()->GetName()
 		    << "' and user '" << user->GetName() << "'.";
 	} catch (const std::exception& ex) {



More information about the icinga-checkins mailing list