From 212436ad50397113522cf5d1c47ee44cb80669a2 Mon Sep 17 00:00:00 2001 From: Rob Zienert Date: Thu, 7 May 2020 13:21:38 -0700 Subject: [PATCH] chore(plugins): Logging improvements on new plugin releases (#732) --- .../igor/plugins/PluginsBuildMonitor.java | 4 +++- .../igor/plugins/model/PluginRelease.java | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/PluginsBuildMonitor.java b/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/PluginsBuildMonitor.java index 8ccbb78c9..5761263aa 100644 --- a/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/PluginsBuildMonitor.java +++ b/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/PluginsBuildMonitor.java @@ -70,7 +70,8 @@ protected void commitDelta(PluginPollingDelta delta, boolean sendEvents) { item -> { if (sendEvents) { postEvent(item.pluginRelease); - log.debug("{} event posted", item.pluginRelease); + } else { + log.debug("{} processed, but not sending event", item.pluginRelease); } }); @@ -90,6 +91,7 @@ private void postEvent(PluginRelease release) { } else if (release != null) { AuthenticatedRequest.allowAnonymous( () -> echoService.get().postEvent(new PluginEvent(release))); + log.debug("{} event posted", release); } } diff --git a/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/model/PluginRelease.java b/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/model/PluginRelease.java index 96ec43d61..3e852a3f9 100644 --- a/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/model/PluginRelease.java +++ b/igor-monitor-plugins/src/main/java/com/netflix/spinnaker/igor/plugins/model/PluginRelease.java @@ -102,4 +102,24 @@ public String getVersion() { return version; } } + + @Override + public String toString() { + return "PluginRelease{" + + "pluginId='" + + pluginId + + '\'' + + ", version='" + + version + + '\'' + + ", releaseDate='" + + releaseDate + + '\'' + + ", preferred=" + + preferred + + ", lastModified='" + + lastModified + + '\'' + + '}'; + } }