Make common log import consistent

Across the project, make the common log import consistent.

Change-Id: I937cd5d337db5d2296dd9238685803bbba3391b3
changes/74/63574/3
Morgan Fainberg 9 years ago
parent 4759276622
commit 559ba206d4
  1. 4
      HACKING.rst
  2. 4
      keystone/assignment/backends/ldap.py
  3. 4
      keystone/assignment/controllers.py
  4. 4
      keystone/assignment/core.py
  5. 4
      keystone/auth/controllers.py
  6. 4
      keystone/auth/plugins/external.py
  7. 4
      keystone/auth/plugins/oauth1.py
  8. 4
      keystone/auth/plugins/password.py
  9. 4
      keystone/auth/plugins/token.py
  10. 4
      keystone/catalog/backends/templated.py
  11. 4
      keystone/catalog/core.py
  12. 4
      keystone/common/cms.py
  13. 4
      keystone/common/controller.py
  14. 4
      keystone/common/environment/__init__.py
  15. 8
      keystone/common/environment/eventlet_server.py
  16. 4
      keystone/common/ldap/core.py
  17. 4
      keystone/common/openssl.py
  18. 4
      keystone/common/utils.py
  19. 9
      keystone/common/wsgi.py
  20. 4
      keystone/contrib/access/core.py
  21. 4
      keystone/contrib/endpoint_filter/core.py
  22. 4
      keystone/contrib/example/core.py
  23. 4
      keystone/contrib/stats/core.py
  24. 4
      keystone/contrib/user_crud/core.py
  25. 4
      keystone/controllers.py
  26. 4
      keystone/credential/core.py
  27. 4
      keystone/exception.py
  28. 4
      keystone/identity/backends/ldap.py
  29. 4
      keystone/identity/controllers.py
  30. 4
      keystone/identity/core.py
  31. 4
      keystone/middleware/core.py
  32. 4
      keystone/middleware/s3_token.py
  33. 4
      keystone/policy/backends/rules.py
  34. 4
      keystone/service.py
  35. 4
      keystone/tests/fakeldap.py
  36. 4
      keystone/token/backends/kvs.py
  37. 4
      keystone/token/backends/memcache.py
  38. 4
      keystone/token/controllers.py
  39. 4
      keystone/token/core.py
  40. 4
      keystone/token/provider.py
  41. 4
      keystone/token/providers/common.py
  42. 4
      keystone/token/providers/pki.py
  43. 4
      keystone/trust/controllers.py
  44. 4
      keystone/trust/core.py

@ -25,8 +25,8 @@ Logging
Use the common logging module, and ensure you ``getLogger``::
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
LOG.debug('Foobar')

@ -27,11 +27,11 @@ from keystone.common import models
from keystone import config
from keystone import exception
from keystone.identity.backends import ldap as ldap_identity
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.requires('identity_api')

@ -26,12 +26,12 @@ from keystone.common import controller
from keystone.common import dependency
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.requires('assignment_api', 'identity_api', 'token_api')

@ -27,11 +27,11 @@ from keystone.common import manager
from keystone import config
from keystone import exception
from keystone import notifications
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('assignment')
DEFAULT_DOMAIN = {'description':

@ -23,11 +23,11 @@ from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.openstack.common import importutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF

@ -23,11 +23,11 @@ import six
from keystone import auth
from keystone.common import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import versionutils
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF

@ -19,12 +19,12 @@ from keystone.common import dependency
from keystone.contrib import oauth1
from keystone.contrib.oauth1 import core as oauth
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
METHOD_NAME = 'oauth1'
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.requires('oauth_api')

@ -17,11 +17,11 @@
from keystone import auth
from keystone.common import dependency
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
METHOD_NAME = 'password'
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.requires('assignment_api', 'identity_api')

@ -17,14 +17,14 @@
from keystone import auth
from keystone.common import wsgi
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.token import provider
METHOD_NAME = 'token'
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class Token(auth.AuthMethodHandler):

@ -20,10 +20,10 @@ from keystone.catalog.backends import kvs
from keystone.catalog import core
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF

@ -25,11 +25,11 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
def format_url(url, data):

@ -17,10 +17,10 @@
import hashlib
from keystone.common import environment
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
PKI_ANS1_PREFIX = 'MII'

@ -22,11 +22,11 @@ from keystone.common import dependency
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import versionutils
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

@ -18,10 +18,10 @@ import functools
import os
from keystone.common import config
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
__all__ = ['Server', 'httplib', 'subprocess']

@ -26,10 +26,10 @@ import eventlet
import eventlet.wsgi
import greenlet
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class Server(object):
@ -104,10 +104,10 @@ class Server(object):
def _run(self, application, socket):
"""Start a WSGI server in a new green thread."""
log = logging.getLogger('eventlet.wsgi.server')
logger = log.getLogger('eventlet.wsgi.server')
try:
eventlet.wsgi.server(socket, application, custom_pool=self.pool,
log=logging.WritableLogger(log))
log=log.WritableLogger(logger))
except Exception:
LOG.exception(_('Server error'))
raise

@ -20,9 +20,9 @@ import ldap
import ldap.filter
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
LDAP_VALUES = {'TRUE': True, 'FALSE': False}

@ -20,9 +20,9 @@ import os
from keystone.common import environment
from keystone.common import utils
from keystone import config
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF
PUBLIC_DIR_PERMS = 0o755 # -rwxr-xr-x

@ -30,13 +30,13 @@ import passlib.hash
from keystone.common import config
from keystone.common import environment
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from six import moves
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
def read_cached_file(filename, cache_info, reload_func=None):

@ -33,11 +33,11 @@ from keystone import exception
from keystone.openstack.common import gettextutils
from keystone.openstack.common import importutils
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
# Environment variable used to pass the request context
CONTEXT_ENV = 'openstack.context'
@ -382,11 +382,11 @@ class Debug(Middleware):
LOG.debug('%s %s %s', ('*' * 20), 'REQUEST ENVIRON', ('*' * 20))
for key, value in req.environ.items():
LOG.debug('%s = %s', key,
logging.mask_password(value))
log.mask_password(value))
LOG.debug('')
LOG.debug('%s %s %s', ('*' * 20), 'REQUEST BODY', ('*' * 20))
for line in req.body_file:
LOG.debug('%s', logging.mask_password(line))
LOG.debug('%s', log.mask_password(line))
LOG.debug('')
resp = req.get_response(self.application)
@ -436,7 +436,6 @@ class Router(object):
mapper.connect(None, '/v1.0/{path_info:.*}', controller=BlogApp())
"""
self.map = mapper
self._router = routes.middleware.RoutesMiddleware(self._dispatch,
self.map)

@ -18,12 +18,12 @@ import webob.dec
from keystone.common import wsgi
from keystone import config
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
CONF = config.CONF
LOG = logging.getLogger('access')
LOG = log.getLogger('access')
APACHE_TIME_FORMAT = '%d/%b/%Y:%H:%M:%S'
APACHE_LOG_FORMAT = (
'%(remote_addr)s - %(remote_user)s [%(datetime)s] "%(method)s %(url)s '

@ -23,11 +23,11 @@ from keystone.common import extension
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
extension_data = {
'name': 'Openstack Keystone Endpoint Filter API',

@ -19,11 +19,11 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.provider('example_api')

@ -20,13 +20,13 @@ from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone import identity
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone import policy
from keystone import token
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
extension_data = {
'name': 'Openstack Keystone Stats API',

@ -21,10 +21,10 @@ from keystone.common import extension
from keystone.common import wsgi
from keystone import exception
from keystone import identity
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
extension.register_public_extension(

@ -18,10 +18,10 @@ from keystone.common import extension
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF
MEDIA_TYPE_JSON = 'application/vnd.openstack.identity-%s+json'

@ -24,12 +24,12 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.provider('credential_api')

@ -17,12 +17,12 @@
import six
from keystone.common import config
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import strutils
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
# Tests use this to make exception message format errors fatal
_FATAL_EXCEPTION_FORMAT_ERRORS = False

@ -26,11 +26,11 @@ from keystone.common import utils
from keystone import config
from keystone import exception
from keystone import identity
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.requires('assignment_api')

@ -25,13 +25,13 @@ from keystone.common import controller
from keystone.common import dependency
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import versionutils
CONF = config.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class DeprecatedMeta(type):

@ -31,13 +31,13 @@ from keystone import config
from keystone import exception
from keystone import notifications
from keystone.openstack.common import importutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import versionutils
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
def moved_to_assignment(f):

@ -22,10 +22,10 @@ from keystone.common import utils
from keystone.common import wsgi
from keystone import exception
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
# Header used to transmit the auth token

@ -38,11 +38,11 @@ import urllib
import webob
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
PROTOCOL_NAME = 'S3 Token Authentication'
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
# TODO(kun): remove it after oslo merge this.

@ -22,13 +22,13 @@ import os.path
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import policy as common_policy
from keystone import policy
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
_ENFORCER = None

@ -27,7 +27,7 @@ from keystone.contrib import endpoint_filter
from keystone import controllers
from keystone import credential
from keystone import identity
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone import policy
from keystone import routers
from keystone import token
@ -35,7 +35,7 @@ from keystone import trust
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
# Ensure the cache is configured and built before we instantiate the managers

@ -30,7 +30,7 @@ import shelve
import ldap
from keystone.common import utils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from six import moves
@ -41,7 +41,7 @@ SCOPE_NAMES = {
}
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
def _process_attr(attr_name, value_or_values):

@ -18,11 +18,11 @@ import copy
from keystone.common import kvs
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone import token
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class Token(kvs.Base, token.Driver):

@ -23,14 +23,14 @@ from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone import token
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class Token(token.Driver):

@ -22,13 +22,13 @@ from keystone.common import dependency
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.token import core
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

@ -28,13 +28,13 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.openstack.common import versionutils
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('token')

@ -25,12 +25,12 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('token')

@ -25,11 +25,11 @@ from keystone.token import provider
from keystone import trust
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

@ -22,13 +22,13 @@ from keystone.common import cms
from keystone.common import environment
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.token.providers import common
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
class Provider(common.BaseProvider):

@ -21,11 +21,11 @@ from keystone.common import controller
from keystone.common import dependency
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
CONF = config.CONF

@ -24,12 +24,12 @@ from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log as logging
from keystone.openstack.common import log
CONF = config.CONF
LOG = logging.getLogger(__name__)
LOG = log.getLogger(__name__)
@dependency.provider('trust_api')

Loading…
Cancel
Save