From 242a8183a7cc002f496421352e8346db4232648b Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 31 Oct 2008 20:25:33 -0600 Subject: Added custom log formatter util.LogFormatter that makes the human-readable time stamp in UTC --- ipalib/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ipalib/util.py') diff --git a/ipalib/util.py b/ipalib/util.py index c1652065..12f9c781 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -25,6 +25,8 @@ import os from os import path import imp import optparse +import logging +import time import krbV @@ -122,3 +124,10 @@ def add_global_options(parser=None): help='Produce more verbose output', ) return parser + + +class LogFormatter(logging.Formatter): + """ + Log formatter that uses UTC for all timestamps. + """ + converter = time.gmtime -- cgit