Using oslo_log instead of logging
Change-Id: I97fc44df44a686110b1e0c47c56adf7207cb5647
diff --git a/tempest/lib/cmd/skip_tracker.py b/tempest/lib/cmd/skip_tracker.py
index d95aa46..07b811d 100755
--- a/tempest/lib/cmd/skip_tracker.py
+++ b/tempest/lib/cmd/skip_tracker.py
@@ -21,16 +21,18 @@
"""
import argparse
-import logging
import os
import re
+from oslo_log import log as logging
+
try:
from launchpadlib import launchpad
except ImportError:
launchpad = None
LPCACHEDIR = os.path.expanduser('~/.launchpadlib/cache')
+LOG = logging.getLogger(__name__)
def parse_args():
@@ -40,11 +42,11 @@
def info(msg, *args, **kwargs):
- logging.info(msg, *args, **kwargs)
+ LOG.info(msg, *args, **kwargs)
def debug(msg, *args, **kwargs):
- logging.debug(msg, *args, **kwargs)
+ LOG.debug(msg, *args, **kwargs)
def find_skips(start):
@@ -110,8 +112,6 @@
def main():
- logging.basicConfig(format='%(levelname)s: %(message)s',
- level=logging.INFO)
parser = parse_args()
results = find_skips(parser.test_path)
unique_bugs = sorted(set([bug for (method, bug) in get_results(results)]))
diff --git a/tools/skip_tracker.py b/tools/skip_tracker.py
index 55f41a6..9735f77 100755
--- a/tools/skip_tracker.py
+++ b/tools/skip_tracker.py
@@ -20,23 +20,25 @@
is fixed but a skip is still in the Tempest test code
"""
-import logging
import os
import re
from launchpadlib import launchpad
+from oslo_log import log as logging
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
TESTDIR = os.path.join(BASEDIR, 'tempest')
LPCACHEDIR = os.path.expanduser('~/.launchpadlib/cache')
+LOG = logging.getLogger(__name__)
+
def info(msg, *args, **kwargs):
- logging.info(msg, *args, **kwargs)
+ LOG.info(msg, *args, **kwargs)
def debug(msg, *args, **kwargs):
- logging.debug(msg, *args, **kwargs)
+ LOG.debug(msg, *args, **kwargs)
def find_skips(start=TESTDIR):
@@ -102,8 +104,6 @@
if __name__ == '__main__':
- logging.basicConfig(format='%(levelname)s: %(message)s',
- level=logging.INFO)
results = find_skips()
unique_bugs = sorted(set([bug for (method, bug) in get_results(results)]))
unskips = []