From b2bb58895f2dee77b2811d4edba0a1fb43ec627d Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 24 Sep 2014 13:58:12 -0400 Subject: [PATCH] =?UTF-8?q?Trying=20to=20improve=20a=20useless=20log=20war?= =?UTF-8?q?ning=20when=20starting=20Docker=20slaves.=20=E2=80=A6=20hudson.?= =?UTF-8?q?tasks.Shell$DescriptorImpl=20getShellOrDefault=20WARNING:=20Rem?= =?UTF-8?q?ote=20call=20on=20=E2=80=A6@docker=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/java/hudson/tasks/Shell.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/tasks/Shell.java b/core/src/main/java/hudson/tasks/Shell.java index 17ce0b8819..223e682ddb 100644 --- a/core/src/main/java/hudson/tasks/Shell.java +++ b/core/src/main/java/hudson/tasks/Shell.java @@ -42,6 +42,7 @@ import org.kohsuke.stapler.QueryParameter; import java.util.List; import java.util.ArrayList; import java.util.Arrays; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -138,9 +139,9 @@ public class Shell extends CommandInterpreter { try { interpreter = channel.call(new Shellinterpreter()); } catch (IOException e) { - LOGGER.warning(e.getMessage()); + LOGGER.log(Level.WARNING, null, e); } catch (InterruptedException e) { - LOGGER.warning(e.getMessage()); + LOGGER.log(Level.WARNING, null, e); } if (interpreter == null) { interpreter = getShellOrDefault();