diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/log.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/log.py b/cloudinit/log.py index 3861709e..1d75c9ff 100644 --- a/cloudinit/log.py +++ b/cloudinit/log.py @@ -19,6 +19,8 @@ import sys import six from six import StringIO +import time + # Logging levels for easy access CRITICAL = logging.CRITICAL FATAL = logging.FATAL @@ -32,6 +34,9 @@ NOTSET = logging.NOTSET # Default basic format DEF_CON_FORMAT = '%(asctime)s - %(filename)s[%(levelname)s]: %(message)s' +# Always format logging timestamps as UTC time +logging.Formatter.converter = time.gmtime + def setupBasicLogging(level=DEBUG): root = logging.getLogger() |