summaryrefslogtreecommitdiffstats
path: root/ipalib/util.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-31 20:25:33 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-31 20:25:33 -0600
commit242a8183a7cc002f496421352e8346db4232648b (patch)
tree23f83463b766af467a631af5c6a8b54973ccf5d6 /ipalib/util.py
parent5e5a83e4e84d2e9a5d6d987056199a8ed83978b8 (diff)
downloadfreeipa-242a8183a7cc002f496421352e8346db4232648b.tar.gz
freeipa-242a8183a7cc002f496421352e8346db4232648b.tar.xz
freeipa-242a8183a7cc002f496421352e8346db4232648b.zip
Added custom log formatter util.LogFormatter that makes the human-readable time stamp in UTC
Diffstat (limited to 'ipalib/util.py')
-rw-r--r--ipalib/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipalib/util.py b/ipalib/util.py
index c16520654..12f9c7814 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