update docs for RichHandler suppress

This commit is contained in:
Leron Gray 2022-01-25 16:58:56 -08:00
parent 607f160e27
commit c87b1a0759
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ Here's how you would exclude `click <https://click.palletsprojects.com/en/8.0.x/
level="NOTSET",
format="%(message)s",
datefmt="[%X]",
handlers=[RichHandler(rich_tracebacks=True, tracebacks_suppress)]
handlers=[RichHandler(rich_tracebacks=True, tracebacks_suppress=[click])]
)
Suppressed frames will show the line and file only, without any code.

View File

@ -61,7 +61,7 @@ At this point, the traceback will be installed for any code that is run within t
Suppressing Frames
------------------
If you are working with a framework (click, django etc), you may only be interested in seeing the code from your own application within the traceback. You can exclude framework code by setting the `suppress` argument on `Traceback`, `install`, and `Console.print_exception`, which should be a list of modules or str paths.
If you are working with a framework (click, django etc), you may only be interested in seeing the code from your own application within the traceback. You can exclude framework code by setting the `suppress` argument on `Traceback`, `install`, `Console.print_exception`, and `RichHandler`, which should be a list of modules or str paths.
Here's how you would exclude `click <https://click.palletsprojects.com/en/8.0.x/>`_ from Rich exceptions::