Merge "Add a note to README.rst about contributing to Zuul v3"
diff --git a/.testr.conf b/.testr.conf
index 222ce97..8ef6689 100644
--- a/.testr.conf
+++ b/.testr.conf
@@ -1,4 +1,4 @@
[DEFAULT]
-test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} OS_LOG_DEFAULTS=${OS_LOG_DEFAULTS:-""} ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION
+test_command=OS_LOG_LEVEL=${OS_LOG_LEVEL:-INFO} OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} OS_LOG_DEFAULTS=${OS_LOG_DEFAULTS:-""} ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
diff --git a/tests/base.py b/tests/base.py
index 38d2817..c5b5b78 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -857,8 +857,19 @@
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
if (os.environ.get('OS_LOG_CAPTURE') == 'True' or
os.environ.get('OS_LOG_CAPTURE') == '1'):
+ log_level = logging.DEBUG
+ if os.environ.get('OS_LOG_LEVEL') == 'DEBUG':
+ log_level = logging.DEBUG
+ elif os.environ.get('OS_LOG_LEVEL') == 'INFO':
+ log_level = logging.INFO
+ elif os.environ.get('OS_LOG_LEVEL') == 'WARNING':
+ log_level = logging.WARNING
+ elif os.environ.get('OS_LOG_LEVEL') == 'ERROR':
+ log_level = logging.ERROR
+ elif os.environ.get('OS_LOG_LEVEL') == 'CRITICAL':
+ log_level = logging.CRITICAL
self.useFixture(fixtures.FakeLogger(
- level=logging.DEBUG,
+ level=log_level,
format='%(asctime)s %(name)-32s '
'%(levelname)-8s %(message)s'))