Revert "Switch to oslo_log"

it caused No handlers could be found for logger "tackerclient.shell"
This reverts commit af2f0f031f.

Change-Id: I8556dbf7ea45a268daa900e00c5334f11cd106d0
This commit is contained in:
gongysh 2017-03-18 06:12:33 +00:00
parent af2f0f031f
commit 919dca0855
8 changed files with 11 additions and 10 deletions

View File

@ -18,11 +18,11 @@ try:
import json import json
except ImportError: except ImportError:
import simplejson as json import simplejson as json
import logging
import os import os
from keystoneclient import access from keystoneclient import access
from keystoneclient import adapter from keystoneclient import adapter
from oslo_log import log as logging
import requests import requests
from tackerclient.common import exceptions from tackerclient.common import exceptions
@ -33,13 +33,13 @@ _logger = logging.getLogger(__name__)
if os.environ.get('TACKERCLIENT_DEBUG'): if os.environ.get('TACKERCLIENT_DEBUG'):
ch = logging.StreamHandler() ch = logging.StreamHandler()
_logger.logger.setLevel(logging.DEBUG) _logger.setLevel(logging.DEBUG)
_logger.addHandler(ch) _logger.addHandler(ch)
_requests_log_level = logging.DEBUG _requests_log_level = logging.DEBUG
else: else:
_requests_log_level = logging.WARNING _requests_log_level = logging.WARNING
logging.getLogger("requests").logger.setLevel(_requests_log_level) logging.getLogger("requests").setLevel(_requests_log_level)
MAX_URI_LEN = 8192 MAX_URI_LEN = 8192

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import logging
from xml.etree import ElementTree as etree from xml.etree import ElementTree as etree
from xml.parsers import expat from xml.parsers import expat
from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
import six import six

View File

@ -18,9 +18,9 @@
"""Utilities and helper functions.""" """Utilities and helper functions."""
import argparse import argparse
import logging
import os import os
from oslo_log import log as logging
from oslo_log import versionutils from oslo_log import versionutils
from oslo_utils import encodeutils from oslo_utils import encodeutils
from oslo_utils import importutils from oslo_utils import importutils

View File

@ -24,6 +24,7 @@ import argparse
import getpass import getpass
import inspect import inspect
import itertools import itertools
import logging
import os import os
import sys import sys
@ -32,7 +33,6 @@ from keystoneclient.auth.identity import v3 as v3_auth
from keystoneclient import discover from keystoneclient import discover
from keystoneclient import exceptions as ks_exc from keystoneclient import exceptions as ks_exc
from keystoneclient import session from keystoneclient import session
from oslo_log import log as logging
from oslo_utils import encodeutils from oslo_utils import encodeutils
import six.moves.urllib.parse as urlparse import six.moves.urllib.parse as urlparse

View File

@ -18,12 +18,12 @@ from __future__ import print_function
import abc import abc
import argparse import argparse
import logging
import re import re
from cliff.formatters import table from cliff.formatters import table
from cliff import lister from cliff import lister
from cliff import show from cliff import show
from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
import six import six

View File

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from oslo_log import log as logging import logging
import testtools import testtools
from testtools import helpers from testtools import helpers

View File

@ -14,6 +14,7 @@
# under the License. # under the License.
import argparse import argparse
import logging
import os import os
import re import re
import six import six
@ -21,7 +22,6 @@ import sys
import fixtures import fixtures
import mox import mox
from oslo_log import log as logging
import testtools import testtools
from testtools import matchers from testtools import matchers

View File

@ -15,9 +15,9 @@
# under the License. # under the License.
# #
import logging
import time import time
from oslo_log import log as logging
import requests import requests
import six.moves.urllib.parse as urlparse import six.moves.urllib.parse as urlparse