aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/logger.py
diff options
context:
space:
mode:
authorzsloan2016-10-03 19:20:21 +0000
committerzsloan2016-10-03 19:20:21 +0000
commitdb0633155b88667e3c6ea760e0637ff1308d34e0 (patch)
tree9a2d3c677bee40b9d428092727ad0e5e9842d912 /wqflask/utility/logger.py
parent6a0a3626baad96deb1e8dc7d27fe1fa15e8c5b98 (diff)
parent2115fcfde74375252f556153d48f52f4d15fb298 (diff)
downloadgenenetwork2-db0633155b88667e3c6ea760e0637ff1308d34e0.tar.gz
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'wqflask/utility/logger.py')
-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"""