summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Koderer <m.koderer@telekom.de>2014-05-19 13:55:56 +0200
committerMarc Koderer <m.koderer@telekom.de>2014-05-19 14:03:07 +0200
commit47f869c3f51bfbacf11596ee86212a5e13d3c2ce (patch)
treefdd5a611bf459a70d9e254e67561bd4038f89053
parent52617e555e0002ae870e3b6ea018121fb23f51d8 (diff)
downloadoslotest-47f869c3f51bfbacf11596ee86212a5e13d3c2ce.tar.gz
Set log level to default value
Instead of setting the log level hard coded to INFO just let the used logger module decide which level is the default. Otherwise a usage of this module will change the log level globally to INFO which is not the default for the python logger module (see http://hg.python.org/cpython/file/2.7/Lib/logging/__init__.py#l1490) Change-Id: I75a0517564e6829dfc1451c77da888548ad2219c Closes-bug: 1320841
-rw-r--r--oslotest/base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/oslotest/base.py b/oslotest/base.py
index 65576b9..f81fae6 100644
--- a/oslotest/base.py
+++ b/oslotest/base.py
@@ -55,10 +55,9 @@ class BaseTestCase(testtools.TestCase):
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
def _fake_logs(self):
+ level = None
if os.environ.get('OS_DEBUG') in _TRUE_VALUES:
level = logging.DEBUG
- else:
- level = logging.INFO
capture_logs = os.environ.get('OS_LOG_CAPTURE') in _TRUE_VALUES
if capture_logs:
self.logger = self.useFixture(