Skip to content

Commit

Permalink
Merge pull request #1 from Vijay-Arora/Vijay-Arora-patch-1
Browse files Browse the repository at this point in the history
Updated logging.py for #9146
  • Loading branch information
Vijay-Arora committed Oct 1, 2021
2 parents f65dfc3 + 26b0702 commit 0ed1b0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/_pytest/logging.py
Expand Up @@ -447,7 +447,10 @@ def clear(self) -> None:
self.handler.reset()

def set_level(self, level: Union[int, str], logger: Optional[str] = None) -> None:
"""Set the level of a logger for the duration of a test.
"""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 level.
.. versionchanged:: 3.4
The levels of the loggers changed by this function will be
Expand Down

0 comments on commit 0ed1b0a

Please sign in to comment.