From: Magnus Hagander Date: Wed, 20 Feb 2013 16:37:21 +0000 (+0100) Subject: Actually put timestamps in the logfile X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=abaab87b8468747ae4a3c49b709e2478a9580ec5;p=pggit.git Actually put timestamps in the logfile --- diff --git a/pggit.py b/pggit.py index beda946..a34fe02 100755 --- a/pggit.py +++ b/pggit.py @@ -18,6 +18,7 @@ import os import os.path import psycopg2 import ConfigParser +from datetime import datetime ALLOWED_COMMANDS = ('git-upload-pack', 'git-receive-pack') WRITE_COMMANDS = ('git-receive-pack') @@ -29,7 +30,7 @@ class Logger(object): def log(self, message): f = open(self.logfile,"a") - f.write("(%s): %s" % (self.user, message)) + f.write("%s: (%s) %s" % (datetime.now(), self.user, message)) f.write("\n") f.close()