From c5a1020395aee1214285218e3d8343ff9876bd73 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Wed, 2 Oct 2013 18:38:37 +0100 Subject: Add syslogging to gitano-update-hook --- bin/gitano-update-hook.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.1