Skip to content

Commit a9f8df6

Browse files
authored
bpo-32212: Updated logging documentation to make parameter names more consistent with source. (GH-4765)
1 parent 5f841b5 commit a9f8df6

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

Doc/library/logging.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ is the module's name in the Python package namespace.
9191
scenario is to attach handlers only to the root logger, and to let
9292
propagation take care of the rest.
9393

94-
.. method:: Logger.setLevel(lvl)
94+
.. method:: Logger.setLevel(level)
9595

96-
Sets the threshold for this logger to *lvl*. Logging messages which are less
97-
severe than *lvl* will be ignored; logging messages which have severity *lvl*
96+
Sets the threshold for this logger to *level*. Logging messages which are less
97+
severe than *level* will be ignored; logging messages which have severity *level*
9898
or higher will be emitted by whichever handler or handlers service this logger,
99-
unless a handler's level has been set to a higher severity level than *lvl*.
99+
unless a handler's level has been set to a higher severity level than *level*.
100100

101101
When a logger is created, the level is set to :const:`NOTSET` (which causes
102102
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.
117117
See :ref:`levels` for a list of levels.
118118

119119
.. versionchanged:: 3.2
120-
The *lvl* parameter now accepts a string representation of the
120+
The *level* parameter now accepts a string representation of the
121121
level such as 'INFO' as an alternative to the integer constants
122122
such as :const:`INFO`. Note, however, that levels are internally stored
123123
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.
267267
message. This method should only be called from an exception handler.
268268

269269

270-
.. method:: Logger.addFilter(filt)
270+
.. method:: Logger.addFilter(filter)
271271

272-
Adds the specified filter *filt* to this logger.
272+
Adds the specified filter *filter* to this logger.
273273

274274

275-
.. method:: Logger.removeFilter(filt)
275+
.. method:: Logger.removeFilter(filter)
276276

277-
Removes the specified filter *filt* from this logger.
277+
Removes the specified filter *filter* from this logger.
278278

279279

280280
.. method:: Logger.filter(record)
@@ -393,33 +393,34 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call
393393
Releases the thread lock acquired with :meth:`acquire`.
394394

395395

396-
.. method:: Handler.setLevel(lvl)
396+
.. method:: Handler.setLevel(level)
397397

398-
Sets the threshold for this handler to *lvl*. Logging messages which are less
399-
severe than *lvl* will be ignored. When a handler is created, the level is set
400-
to :const:`NOTSET` (which causes all messages to be processed).
398+
Sets the threshold for this handler to *level*. Logging messages which are
399+
less severe than *level* will be ignored. When a handler is created, the
400+
level is set to :const:`NOTSET` (which causes all messages to be
401+
processed).
401402

402403
See :ref:`levels` for a list of levels.
403404

404405
.. versionchanged:: 3.2
405-
The *lvl* parameter now accepts a string representation of the
406+
The *level* parameter now accepts a string representation of the
406407
level such as 'INFO' as an alternative to the integer constants
407408
such as :const:`INFO`.
408409

409410

410-
.. method:: Handler.setFormatter(form)
411+
.. method:: Handler.setFormatter(fmt)
411412

412-
Sets the :class:`Formatter` for this handler to *form*.
413+
Sets the :class:`Formatter` for this handler to *fmt*.
413414

414415

415-
.. method:: Handler.addFilter(filt)
416+
.. method:: Handler.addFilter(filter)
416417

417-
Adds the specified filter *filt* to this handler.
418+
Adds the specified filter *filter* to this handler.
418419

419420

420-
.. method:: Handler.removeFilter(filt)
421+
.. method:: Handler.removeFilter(filter)
421422

422-
Removes the specified filter *filt* from this handler.
423+
Removes the specified filter *filter* from this handler.
423424

424425

425426
.. method:: Handler.filter(record)

0 commit comments

Comments
 (0)