]> granicus.if.org Git - icinga2/commitdiff
Add the notification type into the log message
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 3 Aug 2016 15:32:55 +0000 (17:32 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 3 Aug 2016 15:32:55 +0000 (17:32 +0200)
fixes #12304

lib/icinga/notification.cpp

index d9897760c9ffb9199062bb27d10bee27f2a9b13b..41a6cf45f19833779584350b075e3a753b556512 100644 (file)
@@ -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) {