Replace logging with oslo_log
If we use logging lib to initialize a logger, the logger won't be applied the oslo_log config options. Change-Id: Ib6bc686f4296cc335aa5abcc47f266a237d8688c
This commit is contained in:
parent
68248fe540
commit
0267193cf2
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
@ -108,7 +107,7 @@ def build_server():
|
||||
|
||||
LOG.info(_LI('Starting server in PID %s') % os.getpid())
|
||||
LOG.info(_LI("Configuration:"))
|
||||
cfg.CONF.log_opt_values(LOG, logging.INFO)
|
||||
cfg.CONF.log_opt_values(LOG, log.INFO)
|
||||
|
||||
if host == '0.0.0.0':
|
||||
LOG.info(_LI(
|
||||
|
@ -14,16 +14,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
from ceilometer.i18n import _LI
|
||||
from ceilometer import service
|
||||
from ceilometer import storage
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
def dbsync():
|
||||
|
@ -12,9 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
import oslo_messaging
|
||||
from stevedore import extension
|
||||
|
||||
@ -22,7 +21,7 @@ from ceilometer.event import converter as event_converter
|
||||
from ceilometer.i18n import _LE
|
||||
from ceilometer import messaging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
class EventsNotificationEndpoint(object):
|
||||
|
@ -12,7 +12,6 @@
|
||||
# under the License.
|
||||
|
||||
import functools
|
||||
import logging
|
||||
|
||||
import novaclient
|
||||
from novaclient import client as nova_client
|
||||
@ -66,8 +65,8 @@ class Client(object):
|
||||
|
||||
logger = None
|
||||
if cfg.CONF.nova_http_log_debug:
|
||||
logger = logging.getLogger("novaclient-debug")
|
||||
logger.setLevel(log.DEBUG)
|
||||
logger = log.getLogger("novaclient-debug")
|
||||
logger.logger.setLevel(log.DEBUG)
|
||||
|
||||
self.nova_client = nova_client.Client(
|
||||
version=2,
|
||||
|
Loading…
Reference in New Issue
Block a user