[library-web] include timestamp in log lines
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [library-web] include timestamp in log lines
- Date: Sun, 23 Aug 2009 16:32:48 +0000 (UTC)
commit 77fa68bea77d74b88e5291d08859df73258859b4
Author: Frédéric Péters <fpeters 0d be>
Date: Sun Aug 23 18:32:05 2009 +0200
include timestamp in log lines
src/utils.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.py b/src/utils.py
index dfbde93..1d6fca6 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -19,6 +19,7 @@
import logging
import os
import re
+import time
import urllib2
class FakeTarFile:
@@ -91,5 +92,5 @@ class LogFormatter(logging.Formatter):
if self.is_screen and record.levelname[0] == 'I':
sys.stdout.write('\033klgo: %s\033\\' % record.msg)
sys.stdout.flush()
- return '%c: %s' % (record.levelname[0], record.msg)
+ return '%c:[%s] %s' % (record.levelname[0], time.strftime('%Y%m%d %H:%M:%S'), record.msg)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]