diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-12 10:50:40 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-12 10:50:40 (GMT) |
commit | bf94b0f943a4075ef7a5bb9f457db11bd5d8df88 (patch) | |
tree | bf4bee46800df37e7aec51b0b9c11a899d021e9a | |
parent | 95ebf0ef0096aba265ec32d706d1b0e4d9ed5328 (diff) | |
parent | cdc751720ee7a13ac163da1eedf3a513386c98d4 (diff) | |
download | cpython-bf94b0f943a4075ef7a5bb9f457db11bd5d8df88.zip cpython-bf94b0f943a4075ef7a5bb9f457db11bd5d8df88.tar.gz cpython-bf94b0f943a4075ef7a5bb9f457db11bd5d8df88.tar.bz2 |
Merged documentation update for Formatter.formatTime.
-rw-r--r-- | Doc/library/logging.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 5df0805..5070487 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -453,6 +453,14 @@ 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. + .. versionchanged:: 3.3 Previously, the default ISO 8601 format was hard-coded as in this example: ``2010-09-06 22:38:15,292`` where the part before the comma is |