Add debug logging to `gitosis-serve
`.
This commit is contained in:
parent
0dc22b3155
commit
d531488d77
1 changed files with 10 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue