Apply suggestions from code review

Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
This commit is contained in:
Zac Hatfield-Dodds 2023-06-19 20:06:21 -07:00 committed by GitHub
parent bb6155adfa
commit 5b35518389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -447,12 +447,9 @@ class LogCaptureFixture:
self.handler.reset() self.handler.reset()
def set_level(self, level: Union[int, str], logger: Optional[str] = None) -> None: def set_level(self, level: Union[int, str], logger: Optional[str] = None) -> None:
"""Sets the threshold for this logger to level. """Set the threshold level of a logger for the duration of a test.
Logging messages which are less severe than level will be ignored; logging messages Logging messages which are less severe than this level will not be captured.
which have severity level or higher will be emitted by whichever handler or handlers
service this logger, unless a handlers level has been set to a higher severity level
than `level`.
.. versionchanged:: 3.4 .. versionchanged:: 3.4
The levels of the loggers changed by this function will be The levels of the loggers changed by this function will be