diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-11 00:31:03 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-11 00:31:03 +0000 |
commit | 9352a6048cff723220cd022591d93f9ccd2eb814 (patch) | |
tree | fe2517eff364f5250e21951dd9fba08ed4d9d7a7 /src/main/java | |
parent | 3c9d15ce7de4bb919a1933682ef799c36c40b72d (diff) |
Add log4j for logging
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java | 5 |
1 files changed, 4 insertions, 1 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 c8c39d0..825ce8f 100644 --- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java +++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java @@ -1,6 +1,7 @@ package uk.co.blatech.blaears.controllers; import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestBody; @@ -18,6 +19,8 @@ import java.io.IOException; @Controller public class GitPushController { + private static final Logger log = Logger.getLogger(GitPushController.class); + @RequestMapping(value = "/git/push", method = RequestMethod.POST) String push(@RequestBody Push pushMsg, Model model){ try { @@ -28,8 +31,8 @@ public class GitPushController { } commitMsg += commit.getMessage(); } + log.info(commitMsg); Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom beep | bash /home/smsd/msgrelay.bash "}); - Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + commitMsg + " | bash /home/smsd/msgrelay.bash "}); //DANGER Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "}); |