Skip to content

Commit

Permalink
Python API: Add time in console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericDu authored and murlock committed Sep 22, 2020
1 parent 9f50547 commit c0d5241
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oio/common/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def get_logger(

syslog_prefix = conf.get('syslog_prefix', '')

formatter = logging.Formatter(fmt=fmt)
formatter = logging.Formatter(
fmt='%(asctime)s.%(msecs)03d ' + fmt,
datefmt='%Y-%m-%d %H:%M:%S')
if syslog_prefix:
fmt = '%s: %s' % (syslog_prefix, fmt)

Expand Down

0 comments on commit c0d5241

Please sign in to comment.