Skip to content

[QUESTION] Disable traceback globally on production #596

Answered by tiangolo
moracabanas asked this question in Questions
Discussion options

You must be logged in to vote

@moracabanas there's an undocumented feature in Rich to hide tracebacks below a certain level, by putting a variable _rich_traceback_guard with a boolean value (True or False).

You can see how it's used internally here: https://github.com/tiangolo/typer/blob/master/typer/main.py#L675

Maybe that can give you a hint about what to explore and play with. 🤓

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ldaverio
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tiangolo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
5 participants
Converted from issue

This discussion was converted from issue #525 on May 02, 2023 06:22.