Use oslo_log instead of logging

1. the use of the log in the module should be unified.
2. oslo_log wrapped logging.

Change-Id: Iac48fcbcd2fc9a7002fed6a328dc74242ad770de
This commit is contained in:
howardlee
2016-11-10 19:22:25 +08:00
parent 21abbb4cd1
commit b6e17a8bc8

View File

@@ -15,7 +15,6 @@
# under the License. # under the License.
import datetime import datetime
import logging
import socket import socket
from oslo_concurrency import processutils from oslo_concurrency import processutils
@@ -332,7 +331,7 @@ def prepare_service(argv=(), conf=cfg.CONF):
cfg.set_defaults(_options.log_opts, cfg.set_defaults(_options.log_opts,
default_log_levels=_DEFAULT_LOG_LEVELS) default_log_levels=_DEFAULT_LOG_LEVELS)
log.setup(conf, 'python-watcher') log.setup(conf, 'python-watcher')
conf.log_opt_values(LOG, logging.DEBUG) conf.log_opt_values(LOG, log.DEBUG)
objects.register_all() objects.register_all()
gmr.TextGuruMeditation.register_section(_('Plugins'), opts.show_plugins) gmr.TextGuruMeditation.register_section(_('Plugins'), opts.show_plugins)