Port to graduated library oslo.i18n
log_handler is not used any more by Ceilometer project, but still listed on openstack-common.conf, this patch fixes it. Note: oslo-incubator.timeutils is not used by oslo-incubator modules any more after we do code sync, this patch removes it too. gettextutils has graduated from oslo-incubator, we should port our project to use oslo.i18n. To use oslo.i18n conveniently, this patch introduces a helper module ceilometer.i18n, which is stolen from Nova. Note: gettextutils.install is deprecated, see: http://docs.openstack.org/developer/oslo.i18n/usage.html#creating-an-integration-module Note: _ is removed from builtins in tox.ini since we're not using install any more. Change-Id: I829f9faf97c825422b395bf9c01ae5c17c86d9fb Closes-Bug: #1389546
This commit is contained in:
@@ -21,10 +21,10 @@ import socket
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import i18n
|
||||
|
||||
from ceilometer.i18n import _
|
||||
from ceilometer import messaging
|
||||
from ceilometer.openstack.common import gettextutils
|
||||
from ceilometer.openstack.common.gettextutils import _
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer import utils
|
||||
|
||||
@@ -113,8 +113,7 @@ def get_workers(name):
|
||||
|
||||
|
||||
def prepare_service(argv=None):
|
||||
gettextutils.install('ceilometer')
|
||||
gettextutils.enable_lazy()
|
||||
i18n.enable_lazy()
|
||||
log_levels = (cfg.CONF.default_log_levels +
|
||||
['stevedore=INFO', 'keystoneclient=INFO'])
|
||||
cfg.set_defaults(log.log_opts,
|
||||
|
||||
Reference in New Issue
Block a user