summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2013-10-02 18:38:37 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2013-10-02 18:38:37 +0100
commitc5a1020395aee1214285218e3d8343ff9876bd73 (patch)
treeef913ff087879018ba503229c5e5dd5a150bef21 /bin
parent1f5949b45b5305978187d4ed188fbe951a5610b3 (diff)
downloadgitano-c5a1020395aee1214285218e3d8343ff9876bd73.tar.gz
Add syslogging to gitano-update-hook
Diffstat (limited to 'bin')
-rw-r--r--bin/gitano-update-hook.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/gitano-update-hook.in b/bin/gitano-update-hook.in
index e838244..e338ba2 100644
--- a/bin/gitano-update-hook.in
+++ b/bin/gitano-update-hook.in
@@ -25,6 +25,7 @@ local start_log_level = gitano.log.get_level()
-- Clamp level at info until we have checked if the caller
-- is an admin or not
gitano.log.cap_level(gitano.log.level.INFO)
+gitano.log.syslog.open()
local nullsha = ("0"):rep(40)
@@ -258,7 +259,11 @@ end
if repo:uses_hook("update") then
gitano.log.debug("Configuring for update hook")
gitano.actions.set_supple_globals("update")
- gitano.log.info("Running repository update hook")
+
+ local msg = "Running repository update hook"
+ gitano.log.info(msg)
+ gitano.syslog.info(msg)
+
local info = {
username = username,
keytag = keytag,
@@ -277,4 +282,8 @@ end
gitano.log.info("Allowing ref update of",
refname, "from", oldsha, "to", newsha)
+gitano.log.syslog.info("Allowing ref update of", refname)
+
+gitano.log.syslog.close()
+
return 0