diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index e1fa70d6..4c9431b8 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 fb49333b..d9e96a42 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 accc808b..18dba5a0 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/notifier/api.py b/nova/notifier/api.py index 582674a4..83ca4aa7 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 bc859d5c..848e591d 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 ed19959d..886e30c7 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 ca6d1d6a..83178d99 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 b8d2c2b2..9706a5d8 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 c9e66b7c..ac488b08 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/least_cost.py b/nova/scheduler/least_cost.py index d147d6ce..3fbef5bc 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/vsa.py b/nova/scheduler/vsa.py index e3dcf52a..f7a8efc1 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 55942a25..b9d021c7 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/testing/fake/rabbit.py b/nova/testing/fake/rabbit.py index 0cb91bd2..316dc250 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 c41375ac..895ea461 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 153747da..653b4908 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 344c4462..5b8d32d0 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 b2fe465f..928582a2 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 9e318fbf..38ecd33d 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 92dddddd..c4cf1fd3 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 f6b2e8ae..f5f4f47e 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 e645b369..fb7219aa 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 4908f66d..3bab360c 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 8e35d190..bf155e6f 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 951e00b3..cf74eef1 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 632d15a8..f9d0e210 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 bf7a051a..7baa9542 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 1f9dc3eb..dbcccb11 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 f81bb0cb..0eb9cdff 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 45d0b947..9e313ae5 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 83fea8a6..f1c908b2 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 1605c49d..96c259bd 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 76313fdd..cf6632bd 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 fec39498..3f3893e3 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 0cbc16ef..7702d0ec 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 0c08594e..21084d37 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 7840dd48..a4bab624 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 6fc7fdf7..f3343519 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/vsa/api.py b/nova/vsa/api.py index e9d04a85..63e8e6be 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 e9f7edc9..b25678aa 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):