diff --git a/CHANGELOG.md b/CHANGELOG.md index 076a473..731593f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,16 @@ Changelog --------- +**0.14.0 (TBA)** + +* Add `--debug` option to enable debug logging instead of using the `TOOT_DEBUG` + environment variable. + **0.13.0 (2017-08-26)** * Allow passing `--instance` and `--email` to login command -* Add `login_browser` command for proper two factor authentication through the browser (#19, #23) +* Add `login_browser` command for proper two factor authentication through the + browser (#19, #23) **0.12.0 (2017-05-08)** diff --git a/toot/console.py b/toot/console.py index 2dc794b..507587a 100644 --- a/toot/console.py +++ b/toot/console.py @@ -31,6 +31,11 @@ common_args = [ "help": "don't use ANSI colors in output", "action": 'store_true', "default": False, + }), + (["--debug"], { + "help": "show debug log in console", + "action": 'store_true', + "default": False, }) ] @@ -279,7 +284,8 @@ def run_command(app, user, name, args): def main(): - if os.getenv('TOOT_DEBUG'): + # Enable debug log if --debug is in args + if "--debug" in sys.argv: logging.basicConfig(level=logging.DEBUG) # If something is piped in, append it to commandline arguments