From 16f6f35c56a25913570e1acefac477a1cc3ee5ee Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Thu, 6 Jul 2017 15:45:38 +0300 Subject: [PATCH] Add logging --- .../notification/impl/NotificationsManagerImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/notification/impl/NotificationsManagerImpl.java b/platform/platform-impl/src/com/intellij/notification/impl/NotificationsManagerImpl.java index a98262b8a1a8..ef23d1d4d534 100644 --- a/platform/platform-impl/src/com/intellij/notification/impl/NotificationsManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/notification/impl/NotificationsManagerImpl.java @@ -29,6 +29,7 @@ import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.application.ex.ApplicationEx; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.DumbAwareRunnable; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManager; @@ -91,6 +92,8 @@ public class NotificationsManagerImpl extends NotificationsManager { public static final Color FILL_COLOR = new JBColor(Gray._242, new Color(78, 80, 82)); public static final Color BORDER_COLOR = new JBColor(Gray._178.withAlpha(205), new Color(86, 90, 92, 205)); + private static final Logger LOG = Logger.getInstance("#com.intellij.notification.impl.NotificationsManagerImpl"); + public NotificationsManagerImpl() { MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect(); connection.subscribe(Notifications.TOPIC, new MyNotificationListener(null)); @@ -182,6 +185,14 @@ public class NotificationsManagerImpl extends NotificationsManager { default: Balloon balloon = notifyByBalloon(notification, type, project); if (project == null || project.isDefault()) { + LOG.warn("Wrong project: " + + project + + " for notification: " + + notification.getGroupId() + + ", " + + notification.getTitle() + + ", " + + notification.getContent()); return; } if (!settings.isShouldLog() || type == NotificationDisplayType.STICKY_BALLOON) {