Merge pull request #161 from ewels/patch-1

Logging docs - fix 'extras' typo
This commit is contained in:
Will McGugan 2020-07-16 10:47:30 +01:00 committed by GitHub
commit c508c5094d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -16,8 +16,8 @@ Here's an example of how to set up a rich logger::
log = logging.getLogger("rich") log = logging.getLogger("rich")
log.info("Hello, World!") log.info("Hello, World!")
Rich logs won't process console markup by default, but you can enable markup per log statement with the ``extras`` argument as follows:: Rich logs won't process console markup by default, but you can enable markup per log statement with the ``extra`` argument as follows::
log.error("[bold red blink]Server is shutting down![/]", extras={"markup": True}) log.error("[bold red blink]Server is shutting down![/]", extra={"markup": True})
There are a number of options you can use to configure logging output, see the :class:`~rich.logging.RichHandler` reference for details. There are a number of options you can use to configure logging output, see the :class:`~rich.logging.RichHandler` reference for details.