Also include full error message when logging error to stderr.
@@ -192,12 +192,13 @@ def setup(config_file, redirect_stderr=True, excludes=None, disable_existing_log
exc_cls = type(exc)
tb_msg = traceback.format_exc()
+ msg = str(exc)
+ msg += '\n\n' + tb_msg
+
# revert stderr redirection since there is no logger in place.
sys.stderr = sys.__stderr__
# No logger yet therefore write to stderr
- sys.stderr.write('ERROR: %s' % traceback.format_exc())
+ sys.stderr.write('ERROR: %s' % (msg))
- msg = str(exc)
- msg += '\n\n' + tb_msg
raise exc_cls(six.text_type(msg))
