From 6d6f54d5ddb4d85dbb6bbf34446c670e8c7687af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergiusz=20=27q3k=27=20Baza=C5=84ski?= Date: Thu, 25 Apr 2013 14:37:01 +0200 Subject: [PATCH] Add timestamp to log entries. --- bouncer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bouncer.py b/bouncer.py index 6851657..b39d413 100644 --- a/bouncer.py +++ b/bouncer.py @@ -3,6 +3,7 @@ import os import sys import argparse +import time import adsl @@ -48,6 +49,8 @@ def doublefork(pidfile, logfile): self.stream = stream def write(self, data): + timestamp = time.strftime("[%d/%m/%Y %H:%M:%S] ") + self.stream.write(timestamp) self.stream.write(data) self.stream.flush()