diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-12-09 11:09:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 11:09:04 (GMT) |
commit | a9f8df646aac7fc94ced0aefd1ed2c8566d14d10 (patch) | |
tree | 0456614e665d8064522248fc7b4da879e7f345de /Doc/library | |
parent | 5f841b553814969220b096a2b4f959b7f6fcbaf6 (diff) | |
download | cpython-a9f8df646aac7fc94ced0aefd1ed2c8566d14d10.zip cpython-a9f8df646aac7fc94ced0aefd1ed2c8566d14d10.tar.gz cpython-a9f8df646aac7fc94ced0aefd1ed2c8566d14d10.tar.bz2 |
bpo-32212: Updated logging documentation to make parameter names more consistent with source. (GH-4765)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/logging.rst | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 148f131..1ed129c 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -91,12 +91,12 @@ is the module's name in the Python package namespace. scenario is to attach handlers only to the root logger, and to let propagation take care of the rest. - .. method:: Logger.setLevel(lvl) + .. method:: Logger.setLevel(level) - Sets the threshold for this logger to *lvl*. Logging messages which are less - severe than *lvl* will be ignored; logging messages which have severity *lvl* + Sets the threshold for this logger to *level*. Logging messages which are less + severe than *level* will be ignored; logging messages which have severity *level* or higher will be emitted by whichever handler or handlers service this logger, - unless a handler's level has been set to a higher severity level than *lvl*. + unless a handler's level has been set to a higher severity level than *level*. When a logger is created, the level is set to :const:`NOTSET` (which causes all messages to be processed when the logger is the root logger, or delegation @@ -117,7 +117,7 @@ is the module's name in the Python package namespace. See :ref:`levels` for a list of levels. .. versionchanged:: 3.2 - The *lvl* parameter now accepts a string representation of the + The *level* parameter now accepts a string representation of the level such as 'INFO' as an alternative to the integer constants such as :const:`INFO`. Note, however, that levels are internally stored as integers, and methods such as e.g. :meth:`getEffectiveLevel` and @@ -267,14 +267,14 @@ is the module's name in the Python package namespace. message. This method should only be called from an exception handler. - .. method:: Logger.addFilter(filt) + .. method:: Logger.addFilter(filter) - Adds the specified filter *filt* to this logger. + Adds the specified filter *filter* to this logger. - .. method:: Logger.removeFilter(filt) + .. method:: Logger.removeFilter(filter) - Removes the specified filter *filt* from this logger. + Removes the specified filter *filter* from this logger. .. method:: Logger.filter(record) @@ -393,33 +393,34 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call Releases the thread lock acquired with :meth:`acquire`. - .. method:: Handler.setLevel(lvl) + .. method:: Handler.setLevel(level) - Sets the threshold for this handler to *lvl*. Logging messages which are less - severe than *lvl* will be ignored. When a handler is created, the level is set - to :const:`NOTSET` (which causes all messages to be processed). + Sets the threshold for this handler to *level*. Logging messages which are + less severe than *level* will be ignored. When a handler is created, the + level is set to :const:`NOTSET` (which causes all messages to be + processed). See :ref:`levels` for a list of levels. .. versionchanged:: 3.2 - The *lvl* parameter now accepts a string representation of the + The *level* parameter now accepts a string representation of the level such as 'INFO' as an alternative to the integer constants such as :const:`INFO`. - .. method:: Handler.setFormatter(form) + .. method:: Handler.setFormatter(fmt) - Sets the :class:`Formatter` for this handler to *form*. + Sets the :class:`Formatter` for this handler to *fmt*. - .. method:: Handler.addFilter(filt) + .. method:: Handler.addFilter(filter) - Adds the specified filter *filt* to this handler. + Adds the specified filter *filter* to this handler. - .. method:: Handler.removeFilter(filt) + .. method:: Handler.removeFilter(filter) - Removes the specified filter *filt* from this handler. + Removes the specified filter *filter* from this handler. .. method:: Handler.filter(record) |