aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
authorPjotr Prins2016-10-02 11:52:47 +0000
committerPjotr Prins2016-10-02 11:52:47 +0000
commit1107259dc258d0cfcb447519cc36e59e78facdef (patch)
treedc254a46309ac907b515050a298c475caf824bfd /wqflask/utility
parentb4521df539a9817ecf9d70fe5dbe41a5c39d64a0 (diff)
downloadgenenetwork2-1107259dc258d0cfcb447519cc36e59e78facdef.tar.gz
Errors: added time stamps in UTC
Diffstat (limited to 'wqflask/utility')
-rw-r--r--wqflask/utility/logger.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wqflask/utility/logger.py b/wqflask/utility/logger.py
index ddc0ea82..b873e16f 100644
--- a/wqflask/utility/logger.py
+++ b/wqflask/utility/logger.py
@@ -31,6 +31,7 @@ import string
from inspect import isfunction
from pprint import pformat as pf
from inspect import stack
+import datetime
from utility.tools import LOG_LEVEL, LOG_LEVEL_DEBUG, LOG_SQL, LOG_FORMAT
@@ -66,7 +67,10 @@ LOG_LEVEL_DEBUG (NYI).
def error(self,*args):
"""Call logging.error for multiple args"""
- self.collect(self.logger.error,*args)
+ now = datetime.datetime.utcnow()
+ time_str = now.strftime('%H:%M:%S UTC %Y%m%d')
+ l = [time_str]+list(args)
+ self.collect(self.logger.error,*l)
def infof(self,*args):
"""Call logging.info for multiple args lazily"""