Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ea3ea5

Browse files
committed
Mention the additional way to use the lvl parameter and when it changed.
2 parents c8d8b88 + c1f079f commit 0ea3ea5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/library/logging.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ instantiated directly, but always through the module-level function
8787
If the root is reached, and it has a level of NOTSET, then all messages will be
8888
processed. Otherwise, the root's level will be used as the effective level.
8989

90+
.. versionchanged:: 3.2
91+
The *lvl* parameter now accepts a string representation of the
92+
level such as 'INFO' as an alternative to the integer constants
93+
such as :const:`INFO`.
94+
9095

9196
.. method:: Logger.isEnabledFor(lvl)
9297

@@ -322,6 +327,11 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call
322327
severe than *lvl* will be ignored. When a handler is created, the level is set
323328
to :const:`NOTSET` (which causes all messages to be processed).
324329

330+
.. versionchanged:: 3.2
331+
The *lvl* parameter now accepts a string representation of the
332+
level such as 'INFO' as an alternative to the integer constants
333+
such as :const:`INFO`.
334+
325335

326336
.. method:: Handler.setFormatter(form)
327337

0 commit comments

Comments
 (0)