[Python-checkins] cpython (2.7): Closes #12206: documentation update for LogRecord constructor and
vinay.sajip
python-checkins at python.org
Mon Jun 13 16:00:43 CEST 2011
http://hg.python.org/cpython/rev/5fbf0d010276
changeset: 70809:5fbf0d010276
branch: 2.7
parent: 70798:527c40add91d
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Mon Jun 13 14:59:36 2011 +0100
summary:
Closes #12206: documentation update for LogRecord constructor and Formatter.formatTime.
files:
Doc/library/logging.rst | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -416,6 +416,13 @@
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)
@@ -491,6 +498,9 @@
:param name: The name of the logger used to log the event represented by
this LogRecord.
:param level: The numeric level of the logging event (one of DEBUG, INFO etc.)
+ Note that this is converted to *two* attributes of the LogRecord:
+ ``levelno`` for the numeric value and ``levelname`` for the
+ corresponding level name.
:param pathname: The full pathname of the source file where the logging call
was made.
:param lineno: The line number in the source file where the logging call was
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list