diff --git a/mitogen/utils.py b/mitogen/utils.py index 31669ea9..e2820333 100644 --- a/mitogen/utils.py +++ b/mitogen/utils.py @@ -62,7 +62,9 @@ def _formatTime(record, datefmt=None): def log_get_formatter(): - datefmt = '%H:%M:%S.%f' + datefmt = '%H:%M:%S' + if sys.version_info > (2, 6): + datefmt += '.%f' fmt = '%(asctime)s %(levelname).1s %(name)s: %(message)s' formatter = logging.Formatter(fmt, datefmt) formatter.formatTime = _formatTime