From 300f0b2ce66f63c8a5eb522a1bf9d9f750cde514 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 30 Jan 2019 11:05:44 -0500 Subject: [PATCH] Turn on debug loggin by default By default cliff suppresses stack traces on unhandled exceptions in order to keep the output cleaner for users. But in practice this has caused more confusion for stestr users since often the error messages aren't really descriptive enough to indicate what's going wrong (or that it's even a bug in stestr). This is often because exception messages are written assuming the context of the stack trace for debugging, not to be user facing messages. Cliff offers the --debug flag to enable printing the full stack traces. This commit turns that flag on by default when stestr initializes the cliff App object to ensure that it always prints the full stack trace on an unhandled exception. Fixes #220 --- stestr/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stestr/cli.py b/stestr/cli.py index 86d01033..5900326f 100644 --- a/stestr/cli.py +++ b/stestr/cli.py @@ -30,6 +30,7 @@ def __init__(self): ) def initialize_app(self, argv): + self.options.debug = True self.LOG.debug('initialize_app') def prepare_to_run_command(self, cmd):