From: Vinay Sajip Date: Sun, 12 Jun 2011 10:44:28 +0000 (+0100) Subject: Updated Formatter.formatTime documentation. X-Git-Tag: v3.2.1rc2~87^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc751720ee7a13ac163da1eedf3a513386c98d4;p=thirdparty%2FPython%2Fcpython.git Updated Formatter.formatTime documentation. --- diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 76633dba1978..20cd57c5ae20 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -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)