From 81e6784ed9ed750e6029eff07bda8b21d95f097e Mon Sep 17 00:00:00 2001 From: Jim Toth Date: Tue, 18 Aug 2026 09:59:59 -0400 Subject: [PATCH 1/2] Use "debug" for logging env variable setting --- src/main/java/com/plugin/sshjplugin/model/SSHJExec.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java b/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java index 65e1449..8ed2380 100644 --- a/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java +++ b/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java @@ -81,14 +81,14 @@ public void execute(SSHClient ssh) { " (value length: " + entry.getValue().length() + ") for host: " + getHostname()); } catch (ConnectionException e) { failureCount++; - pluginLogger.log(2, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + + pluginLogger.log(3, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + " for host: " + getHostname() + ". Exception: " + e.getClass().getSimpleName() + ": " + e.getMessage()); if (e.getCause() != null) { pluginLogger.log(2, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); } } catch (TransportException e) { failureCount++; - pluginLogger.log(2, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + + pluginLogger.log(3, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + " for host: " + getHostname() + ". TransportException: " + e.getClass().getSimpleName() + ": " + e.getMessage()); if (e.getCause() != null) { pluginLogger.log(2, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); @@ -97,7 +97,7 @@ public void execute(SSHClient ssh) { } if (failureCount > 0) { - pluginLogger.log(2, "["+getPluginName()+"] Environment variable setting completed for host: " + getHostname() + + pluginLogger.log(3, "["+getPluginName()+"] Environment variable setting completed for host: " + getHostname() + ". Success: " + successCount + ", Failed: " + failureCount); } else { pluginLogger.log(3, "["+getPluginName()+"] Successfully set all " + envVars.size() + From 927df9b350c473b3f5c5dd68c9919157f33d29e7 Mon Sep 17 00:00:00 2001 From: Jim Toth Date: Tue, 18 Aug 2026 10:24:48 -0400 Subject: [PATCH 2/2] Also debuggify "Caused by" per Copilot suggestion --- src/main/java/com/plugin/sshjplugin/model/SSHJExec.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java b/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java index 8ed2380..c236d3c 100644 --- a/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java +++ b/src/main/java/com/plugin/sshjplugin/model/SSHJExec.java @@ -84,14 +84,14 @@ public void execute(SSHClient ssh) { pluginLogger.log(3, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + " for host: " + getHostname() + ". Exception: " + e.getClass().getSimpleName() + ": " + e.getMessage()); if (e.getCause() != null) { - pluginLogger.log(2, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); + pluginLogger.log(3, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); } } catch (TransportException e) { failureCount++; pluginLogger.log(3, "["+getPluginName()+"] Failed to set SSH environment variable: " + entry.getKey() + " for host: " + getHostname() + ". TransportException: " + e.getClass().getSimpleName() + ": " + e.getMessage()); if (e.getCause() != null) { - pluginLogger.log(2, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); + pluginLogger.log(3, "["+getPluginName()+"] Caused by: " + e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage()); } } }