]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Updated Formatter.formatTime documentation.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 12 Jun 2011 10:44:28 +0000 (11:44 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 12 Jun 2011 10:44:28 +0000 (11:44 +0100)
Doc/library/logging.rst

index 76633dba197871cbf841eb3f17852a4a16220e2c..20cd57c5ae203ebae6219dc5e3fa19342e637e33 100644 (file)
@@ -453,6 +453,13 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on
       record. Otherwise, the ISO8601 format is used.  The resulting string is
       returned.
 
+      This function uses a user-configurable function to convert the creation
+      time to a tuple. By default, :func:`time.localtime` is used; to change
+      this for a particular formatter instance, set the ``converter`` attribute
+      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.
 
    .. method:: formatException(exc_info)