Update 'logging' imports to openstack-common

Change-Id: Ia1a7b5062e7f882971f2061274f6a4a44cfc8ced
This commit is contained in:
Brian Waldon 2012-07-10 21:39:06 -07:00
parent 69d3cd58b7
commit 279d07eebb
42 changed files with 46 additions and 56 deletions

View File

@ -25,7 +25,6 @@ the local cached copy of the image file is returned.
""" """
import httplib import httplib
import logging
import re import re
import webob import webob
@ -35,6 +34,7 @@ from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
from glance import image_cache from glance import image_cache
import glance.openstack.common.log as logging
from glance import registry from glance import registry
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,12 +19,11 @@
Image Cache Management API Image Cache Management API
""" """
import logging
import routes import routes
from glance.api import cached_images from glance.api import cached_images
from glance.common import wsgi from glance.common import wsgi
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,13 +15,14 @@
# 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
import json import json
import webob.exc import webob.exc
from glance.common import wsgi from glance.common import wsgi
import glance.context import glance.context
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
context_opts = [ context_opts = [

View File

@ -21,10 +21,9 @@ and/or Accept headers and attempts to negotiate an API controller to
return return
""" """
import logging
from glance.api import versions from glance.api import versions
from glance.common import wsgi from glance.common import wsgi
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -18,11 +18,11 @@
"""Policy Engine For Glance""" """Policy Engine For Glance"""
import json import json
import logging
import os.path import os.path
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance.openstack.common import policy from glance.openstack.common import policy
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,11 +15,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
import webob.exc import webob.exc
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
from glance import registry from glance import registry
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -20,7 +20,6 @@
""" """
import errno import errno
import logging
import sys import sys
import traceback import traceback
@ -42,6 +41,7 @@ from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
from glance import notifier from glance import notifier
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance import registry from glance import registry
from glance.store import (create_stores, from glance.store import (create_stores,
get_from_backend, get_from_backend,

View File

@ -15,13 +15,12 @@
# 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
import webob.exc import webob.exc
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
import glance.openstack.common.log as logging
from glance import registry from glance import registry

View File

@ -16,7 +16,6 @@
import copy import copy
import datetime import datetime
import json import json
import logging
import urllib import urllib
import webob.exc import webob.exc
@ -26,6 +25,7 @@ from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
import glance.db import glance.db
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance.openstack.common import timeutils from glance.openstack.common import timeutils
import glance.schema import glance.schema

View File

@ -31,12 +31,12 @@ Keystone (an identity management system).
http://service_endpoint/ http://service_endpoint/
""" """
import json import json
import logging
import urlparse import urlparse
import httplib2 import httplib2
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -23,7 +23,6 @@ import collections
import errno import errno
import functools import functools
import httplib import httplib
import logging
import os import os
import re import re
import select import select
@ -44,6 +43,7 @@ except ImportError:
from glance.common import auth from glance.common import auth
from glance.common import exception, utils from glance.common import exception, utils
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -28,7 +28,6 @@ except ImportError:
from time import sleep from time import sleep
import functools import functools
import logging
import os import os
import platform import platform
import subprocess import subprocess
@ -39,6 +38,7 @@ import iso8601
from webob import exc from webob import exc
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -42,6 +42,7 @@ import webob.exc
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as os_logging
bind_opts = [ bind_opts = [
@ -168,7 +169,7 @@ class Server(object):
self.application = application self.application = application
self.sock = get_socket(default_port) self.sock = get_socket(default_port)
self.logger = logging.getLogger('eventlet.wsgi.server') self.logger = os_logging.getLogger('eventlet.wsgi.server')
if CONF.workers == 0: if CONF.workers == 0:
# Useful for profiling, test, debug etc. # Useful for profiling, test, debug etc.

View File

@ -15,10 +15,10 @@
import datetime import datetime
import functools import functools
import logging
import uuid import uuid
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -33,6 +33,7 @@ from glance.common import exception
from glance.db.sqlalchemy import migration from glance.db.sqlalchemy import migration
from glance.db.sqlalchemy import models from glance.db.sqlalchemy import models
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as os_logging
from glance.openstack.common import timeutils from glance.openstack.common import timeutils
@ -42,7 +43,7 @@ _MAX_RETRIES = None
_RETRY_INTERVAL = None _RETRY_INTERVAL = None
BASE = models.BASE BASE = models.BASE
sa_logger = None sa_logger = None
LOG = logging.getLogger(__name__) LOG = os_logging.getLogger(__name__)
CONTAINER_FORMATS = ['ami', 'ari', 'aki', 'bare', 'ovf'] CONTAINER_FORMATS = ['ami', 'ari', 'aki', 'bare', 'ovf']

View File

@ -19,10 +19,10 @@
Various conveniences used for migration scripts Various conveniences used for migration scripts
""" """
import logging
import sqlalchemy.types import sqlalchemy.types
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,13 +15,13 @@
# 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
import types import types
import urlparse import urlparse
import sqlalchemy import sqlalchemy
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
import glance.store.swift import glance.store.swift
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,6 @@
# 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
import os import os
from migrate.versioning import api as versioning_api from migrate.versioning import api as versioning_api
@ -29,6 +28,7 @@ from migrate.versioning import repository as versioning_repository
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,11 +19,10 @@
LRU Cache for Image Data LRU Cache for Image Data
""" """
import logging
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance.openstack.common import importutils from glance.openstack.common import importutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,12 +19,12 @@
Base attribute driver class Base attribute driver class
""" """
import logging
import os.path import os.path
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -21,7 +21,6 @@ Cache driver that uses SQLite to store information about cached images
from __future__ import absolute_import from __future__ import absolute_import
from contextlib import contextmanager from contextlib import contextmanager
import logging
import os import os
import stat import stat
import time import time
@ -32,6 +31,7 @@ import sqlite3
from glance.common import exception from glance.common import exception
from glance.image_cache.drivers import base from glance.image_cache.drivers import base
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -57,7 +57,6 @@ from __future__ import absolute_import
from contextlib import contextmanager from contextlib import contextmanager
import datetime import datetime
import errno import errno
import logging
import os import os
import stat import stat
import time import time
@ -67,6 +66,7 @@ import xattr
from glance.common import exception from glance.common import exception
from glance.image_cache.drivers import base from glance.image_cache.drivers import base
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,13 +19,12 @@
Prefetches images into the Image Cache Prefetches images into the Image Cache
""" """
import logging
import eventlet import eventlet
from glance.common import exception from glance.common import exception
from glance import context from glance import context
from glance.image_cache import base from glance.image_cache import base
import glance.openstack.common.log as logging
from glance import registry from glance import registry
import glance.store import glance.store
import glance.store.filesystem import glance.store.filesystem

View File

@ -16,13 +16,13 @@
# under the License. # under the License.
import logging
import socket import socket
import uuid import uuid
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
from glance.openstack.common import importutils from glance.openstack.common import importutils
import glance.openstack.common.log as logging
from glance.openstack.common import timeutils from glance.openstack.common import timeutils
notifier_opts = [ notifier_opts = [

View File

@ -15,7 +15,6 @@
import json import json
import logging
import time import time
import kombu.connection import kombu.connection
@ -23,6 +22,7 @@ import kombu.entity
from glance.notifier import strategy from glance.notifier import strategy
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -14,10 +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.
import logging
from glance.notifier import strategy from glance.notifier import strategy
import glance.openstack.common.log as logging
class LoggingStrategy(strategy.Strategy): class LoggingStrategy(strategy.Strategy):

View File

@ -15,12 +15,12 @@
import json import json
import logging
import qpid.messaging import qpid.messaging
from glance.notifier import strategy from glance.notifier import strategy
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,11 +19,11 @@
Registry API Registry API
""" """
import logging
import os import os
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance.registry import client from glance.registry import client
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -19,8 +19,6 @@
Reference implementation registry server WSGI controller Reference implementation registry server WSGI controller
""" """
import logging
from webob import exc from webob import exc
from glance.common import exception from glance.common import exception
@ -28,6 +26,7 @@ from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
import glance.db import glance.db
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance.openstack.common import timeutils from glance.openstack.common import timeutils

View File

@ -15,14 +15,13 @@
# 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
import webob.exc import webob.exc
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.common import wsgi from glance.common import wsgi
import glance.db import glance.db
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,6 @@
# 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
import os import os
import sys import sys
import time import time
@ -24,6 +23,7 @@ from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
from glance.openstack.common import importutils from glance.openstack.common import importutils
import glance.openstack.common.log as logging
from glance import registry from glance import registry
from glance.store import location from glance.store import location

View File

@ -17,10 +17,9 @@
"""Base class for all storage backends""" """Base class for all storage backends"""
import logging
from glance.common import exception from glance.common import exception
from glance.openstack.common import importutils from glance.openstack.common import importutils
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -21,13 +21,13 @@ A simple filesystem-backed store
import errno import errno
import hashlib import hashlib
import logging
import os import os
import urlparse import urlparse
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
import glance.store import glance.store
import glance.store.base import glance.store.base
import glance.store.location import glance.store.location

View File

@ -16,10 +16,10 @@
# under the License. # under the License.
import httplib import httplib
import logging
import urlparse import urlparse
from glance.common import exception from glance.common import exception
import glance.openstack.common.log as logging
import glance.store.base import glance.store.base
import glance.store.location import glance.store.location

View File

@ -39,11 +39,11 @@ that it stores in its storage backends. It **does contain** security
credentials and is **not** user-facing. credentials and is **not** user-facing.
""" """
import logging
import urlparse import urlparse
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -21,11 +21,11 @@ from __future__ import absolute_import
from __future__ import with_statement from __future__ import with_statement
import hashlib import hashlib
import logging
import math import math
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
import glance.store import glance.store
import glance.store.base import glance.store.base
import glance.store.location import glance.store.location

View File

@ -19,7 +19,6 @@
import hashlib import hashlib
import httplib import httplib
import logging
import re import re
import tempfile import tempfile
import urlparse import urlparse
@ -27,6 +26,7 @@ import urlparse
from glance.common import exception from glance.common import exception
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
import glance.store import glance.store
import glance.store.base import glance.store.base
import glance.store.location import glance.store.location

View File

@ -17,12 +17,12 @@
import calendar import calendar
import eventlet import eventlet
import logging
import os import os
import time import time
from glance.common import utils from glance.common import utils
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
from glance import registry from glance import registry
from glance.registry import client from glance.registry import client
from glance import store from glance import store

View File

@ -21,13 +21,13 @@ from __future__ import absolute_import
import hashlib import hashlib
import httplib import httplib
import logging
import math import math
import urllib import urllib
import urlparse import urlparse
from glance.common import exception from glance.common import exception
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
import glance.store import glance.store
import glance.store.base import glance.store.base
import glance.store.location import glance.store.location

View File

@ -15,8 +15,6 @@
# 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
import kombu.entity import kombu.entity
import mox import mox
try: try:
@ -30,6 +28,7 @@ from glance.common import exception
from glance import notifier from glance import notifier
import glance.notifier.notify_kombu import glance.notifier.notify_kombu
from glance.openstack.common import importutils from glance.openstack.common import importutils
import glance.openstack.common.log as logging
from glance.tests import utils from glance.tests import utils

View File

@ -13,12 +13,11 @@
# 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 glance.common import exception from glance.common import exception
from glance.common import wsgi from glance.common import wsgi
import glance.context import glance.context
import glance.db.simple.api as simple_db import glance.db.simple.api as simple_db
import glance.openstack.common.log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,12 +1,12 @@
#!/usr/bin/python #!/usr/bin/python
import logging
import sys import sys
import keystoneclient.v2_0.client import keystoneclient.v2_0.client
import glance.context import glance.context
from glance.openstack.common import cfg from glance.openstack.common import cfg
import glance.openstack.common.log as logging
import glance.registry.context import glance.registry.context
import glance.db.sqlalchemy.api as db_api import glance.db.sqlalchemy.api as db_api