-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a debugging mode controlled by AUGUR_DEBUG
At the moment, this only enables printing of stack traces and the full exception chain for handled (i.e. anticipated) errors, which otherwise were not printed. In the future, this mode can also control the output of verbose debugging/troubleshooting logging for more commands. Commit contents and message based on similar commits I made to Nextstrain CLI.¹ Resolves <#1308>. ¹ <nextstrain/cli@229f2e8> <nextstrain/cli@b6d9290> <nextstrain/cli#208>
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
Debug flags and utilities. | ||
.. envvar:: AUGUR_DEBUG | ||
Set to a truthy value (e.g. 1) to print more information about (handled) | ||
errors. For example, when this is not set or falsey, stack traces and | ||
parent exceptions in an exception chain are omitted from handled errors. | ||
""" | ||
from os import environ | ||
|
||
DEBUGGING = bool(environ.get("AUGUR_DEBUG")) |