aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Virtanen <tv@eagain.net>2007-06-04 14:22:58 +0300
committerTommi Virtanen <tv@eagain.net>2007-06-04 14:22:58 +0300
commitd531488d77ad283e2243f2240680c6a6df01bad7 (patch)
tree3103d410b1cef51e049c90017f59c1dc2293c3ab
parentAllow ``gitosis-serve`` incoming path names to always have ``.git`` suffix. (diff)
downloadgitosis-dakkar-d531488d77ad283e2243f2240680c6a6df01bad7.tar.gz
gitosis-dakkar-d531488d77ad283e2243f2240680c6a6df01bad7.tar.bz2
gitosis-dakkar-d531488d77ad283e2243f2240680c6a6df01bad7.zip
Add debug logging to ``gitosis-serve``.
-rw-r--r--gitosis/serve.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gitosis/serve.py b/gitosis/serve.py
index 9fc55bc..1bf97c1 100644
--- a/gitosis/serve.py
+++ b/gitosis/serve.py
@@ -40,6 +40,7 @@ COMMANDS_WRITE = [
]
def main():
+ log = logging.getLogger('gitosis.serve.main')
os.umask(0022)
parser = getParser()
@@ -53,6 +54,10 @@ def main():
if cmd is None:
die("Need SSH_ORIGINAL_COMMAND in environment.")
+ log.debug('Got command %(cmd)r' % dict(
+ cmd=cmd,
+ ))
+
if '\n' in cmd:
die("Command may not contain newlines.")
@@ -95,6 +100,11 @@ def main():
# didn't have write access and tried to write
die("Write access denied.")
+ log.debug('Serving %(command)r %(newpath)r' % dict(
+ command=command,
+ newpath=newpath,
+ ))
+
# put the command back together with the new path
newcmd = "%(command)s '%(newpath)s'" % dict(
command=command,