diff --git a/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java b/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java index 45549c0a3..ba08765dc 100644 --- a/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java +++ b/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java @@ -127,7 +127,7 @@ private boolean updateExistingJob(AbstractProject project, String config) project.updateByXml(streamSource); created = true; } catch (IOException ioex) { - LOGGER.log(Level.WARNING, String.format("Error writing updated project to file.")); + LOGGER.log(Level.WARNING, String.format("Error writing updated project to file."), ioex); created = false; } return created; @@ -146,7 +146,7 @@ private boolean createNewJob(String jobName, String config) { LOGGER.log(Level.WARNING, "Unsupported encoding used in config. Should be UTF-8."); created = false; } catch (IOException ioex) { - LOGGER.log(Level.WARNING, String.format("Error writing config for new job %s.", jobName)); + LOGGER.log(Level.WARNING, String.format("Error writing config for new job %s.", jobName), ioex); created = false; } return created;