diff options
author | Pjotr Prins | 2016-10-06 14:27:17 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-06 14:27:17 +0000 |
commit | 94f7e2494f5e48b12ae10c0bf46ebc2367b0eecc (patch) | |
tree | a3e3989d0817e63cd6df0ef7d93b50e659c8288f /wqflask/utility/logger.py | |
parent | bd35fd6430e5b8b88fd3a7b8afa933d2b0f20b4e (diff) | |
parent | 416363b3f8940d145d8aec076865b167e78705d9 (diff) | |
download | genenetwork2-94f7e2494f5e48b12ae10c0bf46ebc2367b0eecc.tar.gz |
Merge branch 'master' of github.com:genenetwork/genenetwork2 into mechanize
Diffstat (limited to 'wqflask/utility/logger.py')
-rw-r--r-- | wqflask/utility/logger.py | 6 |
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""" |