Centralize registration of logging options
Move the registration of oslo.log config options into conf/__init__.py with the rest. Change-Id: I4cd3d637878eb5bb798b78fd73f5be99e141da9d Story: 2005264 Task: 30078
This commit is contained in:
parent
394dfadcb9
commit
b647919666
placement
@ -14,6 +14,8 @@
|
||||
# under the License.
|
||||
from __future__ import absolute_import
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from placement.conf import api
|
||||
from placement.conf import base
|
||||
from placement.conf import database
|
||||
@ -21,7 +23,7 @@ from placement.conf import paths
|
||||
from placement.conf import placement
|
||||
|
||||
|
||||
# To avoid global config, we require an existing ConfigOpts is passed
|
||||
# To avoid global config, we require an existing ConfigOpts to be passed
|
||||
# to register_opts. Then the caller can have some assurance that the
|
||||
# config they are using will maintain some independence.
|
||||
def register_opts(conf):
|
||||
@ -30,3 +32,4 @@ def register_opts(conf):
|
||||
database.register_opts(conf)
|
||||
paths.register_opts(conf)
|
||||
placement.register_opts(conf)
|
||||
logging.register_options(conf)
|
||||
|
@ -71,7 +71,6 @@ def _get_config_files(env=None):
|
||||
def _parse_args(config, argv, default_config_files):
|
||||
# register placement's config options
|
||||
conf.register_opts(config)
|
||||
logging.register_options(config)
|
||||
|
||||
if profiler:
|
||||
profiler.set_defaults(config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user