From 5ebcf5eda9b17611249bf906c36b95e02ba0563c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 11 Jul 2007 21:30:41 +0100 Subject: [PATCH] Include timestamps (with 100 us resolution) in Sugar logfiles, to allow debugging of IPC and timeouts --- sugar/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar/logger.py b/sugar/logger.py index 3676c565..6d9ff3ab 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -59,7 +59,7 @@ class LogWriter: if msg[len(msg) - 1] != '\n': msg += "\n" - fmt = "%s - %s" % (level_txt, msg) + fmt = "%.4f %s - %s" % (time.time(), level_txt, msg) fmt = fmt.encode("utf8") self._log_file.write(fmt) self._log_file.flush()