From b800ceb90e2e4de7c9528c0b20a04d8e1d1b6347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Tue, 14 Feb 2012 12:07:02 -0600 Subject: [PATCH] Standardize logging delaration and use * Make modules use getLogger(__name__) and log to the result Change-Id: Ib6d69b4be140ec89affc86ed11e65e422d551df1 --- nova/auth/ldapdriver.py | 2 +- nova/auth/manager.py | 2 +- nova/auth/signer.py | 2 +- nova/exception.py | 2 +- nova/manager.py | 2 +- nova/notifier/api.py | 2 +- nova/notifier/capacity_notifier.py | 2 +- nova/notifier/list_notifier.py | 2 +- nova/rpc/common.py | 2 +- nova/scheduler/api.py | 2 +- nova/scheduler/distributed_scheduler.py | 2 +- nova/scheduler/driver.py | 2 +- nova/scheduler/filters/compute_filter.py | 2 +- nova/scheduler/filters/core_filter.py | 2 +- nova/scheduler/filters/ram_filter.py | 2 +- nova/scheduler/host_manager.py | 2 +- nova/scheduler/least_cost.py | 2 +- nova/scheduler/manager.py | 2 +- nova/scheduler/scheduler_options.py | 2 +- nova/scheduler/vsa.py | 2 +- nova/scheduler/zone_manager.py | 2 +- nova/service.py | 2 +- nova/test.py | 4 ++-- nova/testing/fake/rabbit.py | 2 +- nova/tests/rpc/common.py | 2 +- nova/tests/rpc/test_carrot.py | 2 +- nova/tests/rpc/test_fake.py | 2 +- nova/tests/rpc/test_kombu.py | 2 +- nova/tests/rpc/test_qpid.py | 2 +- nova/tests/scheduler/test_vsa_scheduler.py | 2 +- nova/tests/test_SolidFireSanISCSIDriver.py | 2 +- nova/tests/test_auth.py | 2 +- nova/tests/test_compute.py | 2 +- nova/tests/test_compute_utils.py | 2 +- nova/tests/test_consoleauth.py | 2 +- nova/tests/test_imagecache.py | 2 +- nova/tests/test_instance_types.py | 2 +- nova/tests/test_libvirt.py | 2 +- nova/tests/test_linux_net.py | 2 +- nova/tests/test_network.py | 2 +- nova/tests/test_network_info.py | 2 +- nova/tests/test_quantum.py | 2 +- nova/tests/test_virt_drivers.py | 2 +- nova/tests/test_volume.py | 2 +- nova/tests/test_volume_types.py | 2 +- nova/tests/test_vsa.py | 2 +- nova/tests/test_vsa_volumes.py | 2 +- nova/tests/test_xenapi.py | 2 +- nova/utils.py | 2 +- nova/vsa/api.py | 2 +- nova/vsa/manager.py | 2 +- nova/wsgi.py | 2 +- 52 files changed, 53 insertions(+), 53 deletions(-) diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index e1fa70d65..4c9431b8e 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -90,7 +90,7 @@ ldap_opts = [ FLAGS = flags.FLAGS FLAGS.register_opts(ldap_opts) -LOG = logging.getLogger("nova.ldapdriver") +LOG = logging.getLogger(__name__) if FLAGS.memcached_servers: diff --git a/nova/auth/manager.py b/nova/auth/manager.py index fb49333b2..d9e96a42c 100644 --- a/nova/auth/manager.py +++ b/nova/auth/manager.py @@ -96,7 +96,7 @@ FLAGS.register_opts(auth_opts) flags.DECLARE('osapi_compute_listen_port', 'nova.service') -LOG = logging.getLogger('nova.auth.manager') +LOG = logging.getLogger(__name__) if FLAGS.memcached_servers: diff --git a/nova/auth/signer.py b/nova/auth/signer.py index accc808b3..18dba5a05 100644 --- a/nova/auth/signer.py +++ b/nova/auth/signer.py @@ -57,7 +57,7 @@ from nova import exception from nova import log as logging -LOG = logging.getLogger('nova.signer') +LOG = logging.getLogger(__name__) class Signer(object): diff --git a/nova/exception.py b/nova/exception.py index 7c18c2504..6f3d84717 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -32,7 +32,7 @@ import webob.exc from nova import log as logging -LOG = logging.getLogger('nova.exception') +LOG = logging.getLogger(__name__) class ConvertedException(webob.exc.WSGIHTTPException): diff --git a/nova/manager.py b/nova/manager.py index a5e50b4b6..7a0b2888e 100644 --- a/nova/manager.py +++ b/nova/manager.py @@ -63,7 +63,7 @@ from nova import version FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.manager') +LOG = logging.getLogger(__name__) def periodic_task(*args, **kwargs): diff --git a/nova/notifier/api.py b/nova/notifier/api.py index 582674a4e..83ca4aa7a 100644 --- a/nova/notifier/api.py +++ b/nova/notifier/api.py @@ -21,7 +21,7 @@ from nova import log as logging from nova.openstack.common import cfg -LOG = logging.getLogger('nova.exception') +LOG = logging.getLogger(__name__) notifier_opts = [ cfg.StrOpt('default_notification_level', diff --git a/nova/notifier/capacity_notifier.py b/nova/notifier/capacity_notifier.py index bc859d5c4..848e591d5 100644 --- a/nova/notifier/capacity_notifier.py +++ b/nova/notifier/capacity_notifier.py @@ -18,7 +18,7 @@ from nova import db from nova import log as logging -LOG = logging.getLogger('nova.notifier.capacity_notifier') +LOG = logging.getLogger(__name__) def notify(message): diff --git a/nova/notifier/list_notifier.py b/nova/notifier/list_notifier.py index ed19959dc..886e30c73 100644 --- a/nova/notifier/list_notifier.py +++ b/nova/notifier/list_notifier.py @@ -27,7 +27,7 @@ list_notifier_drivers_opt = cfg.MultiStrOpt('list_notifier_drivers', FLAGS = flags.FLAGS FLAGS.register_opt(list_notifier_drivers_opt) -LOG = logging.getLogger('nova.notifier.list_notifier') +LOG = logging.getLogger(__name__) drivers = None diff --git a/nova/rpc/common.py b/nova/rpc/common.py index ca6d1d6a1..83178d997 100644 --- a/nova/rpc/common.py +++ b/nova/rpc/common.py @@ -25,7 +25,7 @@ from nova import log as logging from nova.openstack.common import cfg -LOG = logging.getLogger('nova.rpc') +LOG = logging.getLogger(__name__) rpc_opts = [ cfg.IntOpt('rpc_thread_pool_size', diff --git a/nova/scheduler/api.py b/nova/scheduler/api.py index b8d2c2b2b..9706a5d8e 100644 --- a/nova/scheduler/api.py +++ b/nova/scheduler/api.py @@ -40,7 +40,7 @@ enable_zone_routing_opt = cfg.BoolOpt('enable_zone_routing', FLAGS = flags.FLAGS FLAGS.register_opt(enable_zone_routing_opt) -LOG = logging.getLogger('nova.scheduler.api') +LOG = logging.getLogger(__name__) def _call_scheduler(method, context, params=None): diff --git a/nova/scheduler/distributed_scheduler.py b/nova/scheduler/distributed_scheduler.py index c9e66b7ca..ac488b086 100644 --- a/nova/scheduler/distributed_scheduler.py +++ b/nova/scheduler/distributed_scheduler.py @@ -38,7 +38,7 @@ from nova import utils FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.scheduler.distributed_scheduler') +LOG = logging.getLogger(__name__) class DistributedScheduler(driver.Scheduler): diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index fa5bd13ad..1552555f7 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -36,7 +36,7 @@ from nova.scheduler import zone_manager from nova import utils -LOG = logging.getLogger('nova.scheduler.driver') +LOG = logging.getLogger(__name__) scheduler_driver_opts = [ cfg.StrOpt('scheduler_host_manager', diff --git a/nova/scheduler/filters/compute_filter.py b/nova/scheduler/filters/compute_filter.py index f576eace1..ce2c3fb15 100644 --- a/nova/scheduler/filters/compute_filter.py +++ b/nova/scheduler/filters/compute_filter.py @@ -18,7 +18,7 @@ from nova.scheduler.filters import abstract_filter from nova import utils -LOG = logging.getLogger('nova.scheduler.filter.compute_filter') +LOG = logging.getLogger(__name__) class ComputeFilter(abstract_filter.AbstractHostFilter): diff --git a/nova/scheduler/filters/core_filter.py b/nova/scheduler/filters/core_filter.py index c34f29daf..f7333a661 100644 --- a/nova/scheduler/filters/core_filter.py +++ b/nova/scheduler/filters/core_filter.py @@ -21,7 +21,7 @@ from nova.openstack.common import cfg from nova.scheduler.filters import abstract_filter -LOG = logging.getLogger('nova.scheduler.filter.core_filter') +LOG = logging.getLogger(__name__) cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio', default=16.0, diff --git a/nova/scheduler/filters/ram_filter.py b/nova/scheduler/filters/ram_filter.py index eacc583e8..a2b5d2757 100644 --- a/nova/scheduler/filters/ram_filter.py +++ b/nova/scheduler/filters/ram_filter.py @@ -19,7 +19,7 @@ from nova import log as logging from nova.openstack.common import cfg from nova.scheduler.filters import abstract_filter -LOG = logging.getLogger('nova.scheduler.filter.ram_filter') +LOG = logging.getLogger(__name__) ram_allocation_ratio_opt = cfg.FloatOpt("ram_allocation_ratio", default=1.0, diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index 06515b001..090773aaf 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -49,7 +49,7 @@ host_manager_opts = [ FLAGS = flags.FLAGS FLAGS.register_opts(host_manager_opts) -LOG = logging.getLogger('nova.scheduler.host_manager') +LOG = logging.getLogger(__name__) class ReadOnlyDict(UserDict.IterableUserDict): diff --git a/nova/scheduler/least_cost.py b/nova/scheduler/least_cost.py index d147d6ceb..3fbef5bc5 100644 --- a/nova/scheduler/least_cost.py +++ b/nova/scheduler/least_cost.py @@ -27,7 +27,7 @@ from nova.openstack.common import cfg from nova import log as logging -LOG = logging.getLogger('nova.scheduler.least_cost') +LOG = logging.getLogger(__name__) least_cost_opts = [ cfg.ListOpt('least_cost_functions', diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index 32e509f23..1a94a6b0b 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -34,7 +34,7 @@ from nova import rpc from nova import utils -LOG = logging.getLogger('nova.scheduler.manager') +LOG = logging.getLogger(__name__) scheduler_driver_opt = cfg.StrOpt('scheduler_driver', default='nova.scheduler.multi.MultiScheduler', diff --git a/nova/scheduler/scheduler_options.py b/nova/scheduler/scheduler_options.py index 787a063c3..c4b7bdbfd 100644 --- a/nova/scheduler/scheduler_options.py +++ b/nova/scheduler/scheduler_options.py @@ -37,7 +37,7 @@ scheduler_json_config_location_opt = cfg.StrOpt( FLAGS = flags.FLAGS FLAGS.register_opt(scheduler_json_config_location_opt) -LOG = logging.getLogger('nova.scheduler.scheduler_options') +LOG = logging.getLogger(__name__) class SchedulerOptions(object): diff --git a/nova/scheduler/vsa.py b/nova/scheduler/vsa.py index e3dcf52a1..f7a8efc12 100644 --- a/nova/scheduler/vsa.py +++ b/nova/scheduler/vsa.py @@ -33,7 +33,7 @@ from nova.vsa.api import VsaState from nova.volume import volume_types -LOG = logging.getLogger('nova.scheduler.vsa') +LOG = logging.getLogger(__name__) vsa_scheduler_opts = [ cfg.IntOpt('drive_type_approx_capacity_percent', diff --git a/nova/scheduler/zone_manager.py b/nova/scheduler/zone_manager.py index 55942a25d..b9d021c75 100644 --- a/nova/scheduler/zone_manager.py +++ b/nova/scheduler/zone_manager.py @@ -42,7 +42,7 @@ zone_manager_opts = [ FLAGS = flags.FLAGS FLAGS.register_opts(zone_manager_opts) -LOG = logging.getLogger('nova.scheduler.zone_manager') +LOG = logging.getLogger(__name__) class ZoneState(object): diff --git a/nova/service.py b/nova/service.py index dd943f952..adf242f3d 100644 --- a/nova/service.py +++ b/nova/service.py @@ -37,7 +37,7 @@ from nova import version from nova import wsgi -LOG = logging.getLogger('nova.service') +LOG = logging.getLogger(__name__) service_opts = [ cfg.IntOpt('report_interval', diff --git a/nova/test.py b/nova/test.py index 1bb46c97b..db0bb7d24 100644 --- a/nova/test.py +++ b/nova/test.py @@ -35,7 +35,7 @@ import stubout from nova import flags import nova.image.fake -from nova import log +from nova import log as logging from nova.openstack.common import cfg from nova import utils from nova import service @@ -55,7 +55,7 @@ test_opts = [ FLAGS = flags.FLAGS FLAGS.register_opts(test_opts) -LOG = log.getLogger('nova.tests') +LOG = logging.getLogger(__name__) class skip_test(object): diff --git a/nova/testing/fake/rabbit.py b/nova/testing/fake/rabbit.py index 0cb91bd25..316dc2509 100644 --- a/nova/testing/fake/rabbit.py +++ b/nova/testing/fake/rabbit.py @@ -26,7 +26,7 @@ from eventlet import greenthread from nova import log as logging -LOG = logging.getLogger("nova.testing.fake.rabbit") +LOG = logging.getLogger(__name__) EXCHANGES = {} diff --git a/nova/tests/rpc/common.py b/nova/tests/rpc/common.py index c41375ace..895ea4618 100644 --- a/nova/tests/rpc/common.py +++ b/nova/tests/rpc/common.py @@ -29,7 +29,7 @@ from nova.rpc.common import RemoteError, Timeout from nova import test -LOG = logging.getLogger('nova.tests.rpc') +LOG = logging.getLogger(__name__) class _BaseRpcTestCase(test.TestCase): diff --git a/nova/tests/rpc/test_carrot.py b/nova/tests/rpc/test_carrot.py index 153747da2..653b4908a 100644 --- a/nova/tests/rpc/test_carrot.py +++ b/nova/tests/rpc/test_carrot.py @@ -24,7 +24,7 @@ from nova.rpc import impl_carrot from nova.tests.rpc import common -LOG = logging.getLogger('nova.tests.rpc') +LOG = logging.getLogger(__name__) class RpcCarrotTestCase(common._BaseRpcTestCase): diff --git a/nova/tests/rpc/test_fake.py b/nova/tests/rpc/test_fake.py index 344c44628..5b8d32d0c 100644 --- a/nova/tests/rpc/test_fake.py +++ b/nova/tests/rpc/test_fake.py @@ -24,7 +24,7 @@ from nova.rpc import impl_fake from nova.tests.rpc import common -LOG = logging.getLogger('nova.tests.rpc') +LOG = logging.getLogger(__name__) class RpcFakeTestCase(common._BaseRpcTestCase): diff --git a/nova/tests/rpc/test_kombu.py b/nova/tests/rpc/test_kombu.py index b2fe465fa..928582a2f 100644 --- a/nova/tests/rpc/test_kombu.py +++ b/nova/tests/rpc/test_kombu.py @@ -25,7 +25,7 @@ from nova.rpc import impl_kombu from nova.tests.rpc import common -LOG = logging.getLogger('nova.tests.rpc') +LOG = logging.getLogger(__name__) class MyException(Exception): diff --git a/nova/tests/rpc/test_qpid.py b/nova/tests/rpc/test_qpid.py index 9e318fbfd..38ecd33d9 100644 --- a/nova/tests/rpc/test_qpid.py +++ b/nova/tests/rpc/test_qpid.py @@ -35,7 +35,7 @@ except ImportError: impl_qpid = None -LOG = logging.getLogger('nova.tests.rpc') +LOG = logging.getLogger(__name__) class RpcQpidTestCase(test.TestCase): diff --git a/nova/tests/scheduler/test_vsa_scheduler.py b/nova/tests/scheduler/test_vsa_scheduler.py index 92dddddd8..c4cf1fd3c 100644 --- a/nova/tests/scheduler/test_vsa_scheduler.py +++ b/nova/tests/scheduler/test_vsa_scheduler.py @@ -27,7 +27,7 @@ from nova.volume import volume_types FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.scheduler.vsa') +LOG = logging.getLogger(__name__) scheduled_volumes = [] scheduled_volume = {} diff --git a/nova/tests/test_SolidFireSanISCSIDriver.py b/nova/tests/test_SolidFireSanISCSIDriver.py index f6b2e8aeb..f5f4f47eb 100644 --- a/nova/tests/test_SolidFireSanISCSIDriver.py +++ b/nova/tests/test_SolidFireSanISCSIDriver.py @@ -20,7 +20,7 @@ from nova import log as logging from nova.volume.san import SolidFireSanISCSIDriver as SFID from nova import test -LOG = logging.getLogger('nova.tests.test_solidfire') +LOG = logging.getLogger(__name__) class SolidFireVolumeTestCase(test.TestCase): diff --git a/nova/tests/test_auth.py b/nova/tests/test_auth.py index e645b3698..fb7219aad 100644 --- a/nova/tests/test_auth.py +++ b/nova/tests/test_auth.py @@ -28,7 +28,7 @@ from nova.api.ec2 import cloud from nova.auth import fakeldap FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.auth_unittest') +LOG = logging.getLogger(__name__) class user_generator(object): diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index 4908f66db..3bab360c4 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -54,7 +54,7 @@ from nova import utils import nova.volume -LOG = logging.getLogger('nova.tests.compute') +LOG = logging.getLogger(__name__) FLAGS = flags.FLAGS flags.DECLARE('stub_network', 'nova.compute.manager') flags.DECLARE('live_migration_retry_count', 'nova.compute.manager') diff --git a/nova/tests/test_compute_utils.py b/nova/tests/test_compute_utils.py index 8e35d1905..bf155e6f5 100644 --- a/nova/tests/test_compute_utils.py +++ b/nova/tests/test_compute_utils.py @@ -32,7 +32,7 @@ from nova.notifier import test_notifier from nova.tests import fake_network -LOG = logging.getLogger('nova.tests.compute_utils') +LOG = logging.getLogger(__name__) FLAGS = flags.FLAGS flags.DECLARE('stub_network', 'nova.compute.manager') diff --git a/nova/tests/test_consoleauth.py b/nova/tests/test_consoleauth.py index 951e00b33..cf74eef18 100644 --- a/nova/tests/test_consoleauth.py +++ b/nova/tests/test_consoleauth.py @@ -32,7 +32,7 @@ from nova.consoleauth import manager FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.consoleauth') +LOG = logging.getLogger(__name__) class ConsoleauthTestCase(test.TestCase): diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py index 632d15a86..f9d0e2103 100644 --- a/nova/tests/test_imagecache.py +++ b/nova/tests/test_imagecache.py @@ -35,7 +35,7 @@ from nova.virt.libvirt import utils as virtutils flags.DECLARE('instances_path', 'nova.compute.manager') FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.test_imagecache') +LOG = logging.getLogger(__name__) class ImageCacheManagerTestCase(test.TestCase): diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py index bf7a051af..7baa9542f 100644 --- a/nova/tests/test_instance_types.py +++ b/nova/tests/test_instance_types.py @@ -28,7 +28,7 @@ from nova.db.sqlalchemy.session import get_session from nova.db.sqlalchemy import models FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.compute') +LOG = logging.getLogger(__name__) class InstanceTypeTestCase(test.TestCase): diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 1f9dc3eb8..dbcccb11e 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -54,7 +54,7 @@ except ImportError: FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.test_libvirt') +LOG = logging.getLogger(__name__) _fake_network_info = fake_network.fake_get_instance_nw_info _ipv4_like = fake_network.ipv4_like diff --git a/nova/tests/test_linux_net.py b/nova/tests/test_linux_net.py index f81bb0cbc..0eb9cdffb 100644 --- a/nova/tests/test_linux_net.py +++ b/nova/tests/test_linux_net.py @@ -30,7 +30,7 @@ from nova.network import linux_net FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.network') +LOG = logging.getLogger(__name__) HOST = "testhost" diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py index 45d0b947b..9e313ae5c 100644 --- a/nova/tests/test_network.py +++ b/nova/tests/test_network.py @@ -30,7 +30,7 @@ from nova.network import manager as network_manager from nova.tests import fake_network -LOG = logging.getLogger('nova.tests.network') +LOG = logging.getLogger(__name__) HOST = "testhost" diff --git a/nova/tests/test_network_info.py b/nova/tests/test_network_info.py index 83fea8a64..f1c908b2c 100644 --- a/nova/tests/test_network_info.py +++ b/nova/tests/test_network_info.py @@ -21,7 +21,7 @@ from nova.network import model from nova import test from nova.tests import fake_network_cache_model -LOG = logging.getLogger('nova.tests.network') +LOG = logging.getLogger(__name__) class RouteTests(test.TestCase): diff --git a/nova/tests/test_quantum.py b/nova/tests/test_quantum.py index 1605c49db..96c259bd5 100644 --- a/nova/tests/test_quantum.py +++ b/nova/tests/test_quantum.py @@ -27,7 +27,7 @@ from nova import test from nova import utils from nova.network import manager -LOG = logging.getLogger('nova.tests.quantum_network') +LOG = logging.getLogger(__name__) # this class can be used for unit functional/testing on nova, diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index 76313fdd0..cf6632bda 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -29,7 +29,7 @@ from nova.tests import utils as test_utils libvirt = None FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.test_virt_drivers') +LOG = logging.getLogger(__name__) def catch_notimplementederror(f): diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py index fec394984..3f3893e39 100644 --- a/nova/tests/test_volume.py +++ b/nova/tests/test_volume.py @@ -34,7 +34,7 @@ from nova import utils import nova.volume.api FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.volume') +LOG = logging.getLogger(__name__) class VolumeTestCase(test.TestCase): diff --git a/nova/tests/test_volume_types.py b/nova/tests/test_volume_types.py index 0cbc16ef3..7702d0ecc 100644 --- a/nova/tests/test_volume_types.py +++ b/nova/tests/test_volume_types.py @@ -28,7 +28,7 @@ from nova.db.sqlalchemy.session import get_session from nova.db.sqlalchemy import models FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.test_volume_types') +LOG = logging.getLogger(__name__) class VolumeTypeTestCase(test.TestCase): diff --git a/nova/tests/test_vsa.py b/nova/tests/test_vsa.py index 0c08594ec..21084d378 100644 --- a/nova/tests/test_vsa.py +++ b/nova/tests/test_vsa.py @@ -30,7 +30,7 @@ from nova.vsa import utils as vsa_utils import nova.image.fake FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.vsa') +LOG = logging.getLogger(__name__) class VsaTestCase(test.TestCase): diff --git a/nova/tests/test_vsa_volumes.py b/nova/tests/test_vsa_volumes.py index 7840dd481..a4bab624a 100644 --- a/nova/tests/test_vsa_volumes.py +++ b/nova/tests/test_vsa_volumes.py @@ -23,7 +23,7 @@ from nova import log as logging import nova.image.fake FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.tests.vsa.volumes') +LOG = logging.getLogger(__name__) class VsaVolumesTestCase(test.TestCase): diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 6fc7fdf7d..f3343519e 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -45,7 +45,7 @@ from nova.tests.glance import stubs as glance_stubs from nova.tests import fake_network from nova.tests import fake_utils -LOG = logging.getLogger('nova.tests.test_xenapi') +LOG = logging.getLogger(__name__) FLAGS = flags.FLAGS diff --git a/nova/utils.py b/nova/utils.py index 7bbfed1e0..0af09e809 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -52,7 +52,7 @@ from nova import log as logging from nova.openstack.common import cfg -LOG = logging.getLogger("nova.utils") +LOG = logging.getLogger(__name__) ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f" FLAGS = flags.FLAGS diff --git a/nova/vsa/api.py b/nova/vsa/api.py index e9d04a85e..63e8e6bee 100644 --- a/nova/vsa/api.py +++ b/nova/vsa/api.py @@ -64,7 +64,7 @@ vsa_opts = [ FLAGS = flags.FLAGS FLAGS.register_opts(vsa_opts) -LOG = logging.getLogger('nova.vsa') +LOG = logging.getLogger(__name__) class API(base.Base): diff --git a/nova/vsa/manager.py b/nova/vsa/manager.py index e9f7edc97..b25678aae 100644 --- a/nova/vsa/manager.py +++ b/nova/vsa/manager.py @@ -42,7 +42,7 @@ vsa_driver_opt = cfg.StrOpt('vsa_driver', FLAGS = flags.FLAGS FLAGS.register_opt(vsa_driver_opt) -LOG = logging.getLogger('nova.vsa.manager') +LOG = logging.getLogger(__name__) class VsaManager(manager.SchedulerDependentManager): diff --git a/nova/wsgi.py b/nova/wsgi.py index e2f17ea78..9204146ed 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -36,7 +36,7 @@ from nova import utils FLAGS = flags.FLAGS -LOG = logging.getLogger('nova.wsgi') +LOG = logging.getLogger(__name__) class Server(object):