From: eperdomo Date: Tue, 25 Oct 2011 21:25:46 +0000 (-0700) Subject: Changing the log messages in order to be always identified by their sub-packages... X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ce2b509c0b50ce882d43737f56245b4145c37064;p=openstack-build%2Fneutron-build.git Changing the log messages in order to be always identified by their sub-packages of origin, and they can even be filtered on that basis Change-Id: I900f8052416cbded698a806895fe145e61d47f1c --- diff --git a/quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py b/quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py index a760fefad..e2cb38b3a 100644 --- a/quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py +++ b/quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py @@ -21,7 +21,7 @@ Implements a Nexus-OS NETCONF over SSHv2 API Client """ -import logging as LOG +import logging from quantum.plugins.cisco.common import cisco_constants as const from quantum.plugins.cisco.db import l2network_db as cdb @@ -29,8 +29,7 @@ from quantum.plugins.cisco.nexus import cisco_nexus_snippets as snipp from ncclient import manager -LOG.basicConfig(level=LOG.WARN) -LOG.getLogger(const.LOGGER_COMPONENT_NAME) +LOG = logging.getLogger(__name__) class CiscoNEXUSDriver(): diff --git a/quantum/plugins/cisco/nexus/cisco_nexus_plugin.py b/quantum/plugins/cisco/nexus/cisco_nexus_plugin.py index 6c752832e..bef42fd45 100644 --- a/quantum/plugins/cisco/nexus/cisco_nexus_plugin.py +++ b/quantum/plugins/cisco/nexus/cisco_nexus_plugin.py @@ -20,7 +20,7 @@ """ PlugIn for Nexus OS driver """ -import logging as LOG +import logging from quantum.common import exceptions as exc from quantum.common import utils @@ -32,8 +32,7 @@ from quantum.plugins.cisco.db import nexus_db as nxos_db from quantum.plugins.cisco.l2device_plugin_base import L2DevicePluginBase from quantum.plugins.cisco.nexus import cisco_nexus_configuration as conf -LOG.basicConfig(level=LOG.WARN) -LOG.getLogger(const.LOGGER_COMPONENT_NAME) +LOG = logging.getLogger(__name__) class NexusPlugin(L2DevicePluginBase): diff --git a/quantum/plugins/cisco/nexus/cisco_nexus_snippets.py b/quantum/plugins/cisco/nexus/cisco_nexus_snippets.py index df713fb5b..18b1f7cd8 100644 --- a/quantum/plugins/cisco/nexus/cisco_nexus_snippets.py +++ b/quantum/plugins/cisco/nexus/cisco_nexus_snippets.py @@ -20,12 +20,11 @@ Nexus-OS XML-based configuration snippets """ -import logging as LOG +import logging from quantum.plugins.cisco.common import cisco_constants as const -LOG.basicConfig(level=LOG.WARN) -LOG.getLogger(const.LOGGER_COMPONENT_NAME) +LOG = logging.getLogger(__name__) # The following are standard strings, messages used to communicate with Nexus,