diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-11 17:23:23 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-11 17:23:23 +0000 |
commit | 51ed9d04eafb6469ad1dc13f482858f42ca9dab7 (patch) | |
tree | e222727b62cbc5bc0c4f6fa7cec63cf24988e507 /src/main/java/uk/co | |
parent | 8239ba8faf0a018832626e41a4ec5ccba9fb6d60 (diff) |
Add extra logging
Diffstat (limited to 'src/main/java/uk/co')
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java index eca58ec..ab9971d 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java @@ -39,10 +39,13 @@ public class GitPushController { log.info("Received commits: " + commitMsg); //DANGER - Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "}); + String command = "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "; + log.info("Running command: " + command); + + Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", command}); model.addAttribute("result", "OK"); } catch (IOException e) { - System.out.println("Failed to run command"); + log.error("Failed to run command"); e.printStackTrace(); model.addAttribute("result", "failed"); } |