summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-08-30 18:10:03 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-08-30 18:10:03 (GMT)
commit40d9a4e854d71a9c307f4f92a1e8336b4714a3c8 (patch)
tree2cf02f928069152d69840bfc7a70c3f450daf03f /Doc
parent33a299428d1adc12b57d2ba0ee89c9393f08834a (diff)
downloadcpython-40d9a4e854d71a9c307f4f92a1e8336b4714a3c8.zip
cpython-40d9a4e854d71a9c307f4f92a1e8336b4714a3c8.tar.gz
cpython-40d9a4e854d71a9c307f4f92a1e8336b4714a3c8.tar.bz2
Improved logging.Formatter date/time formatting documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index c1ae108..4e880b2 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -319,6 +319,14 @@ order::
"%(asctime)s - %(levelname)s - %(message)s"
+Formatters use a user-configurable function to convert the creation time of a
+record to a tuple. By default, :func:`time.localtime` is used; to change this
+for a particular formatter instance, set the ``converter`` attribute of the
+instance to a function with the same signature as :func:`time.localtime` or
+:func:`time.gmtime`. To change it for all formatters, for example if you want
+all logging times to be shown in GMT, set the ``converter`` attribute in the
+Formatter class (to ``time.gmtime`` for GMT display).
+
Configuring Logging
^^^^^^^^^^^^^^^^^^^