Merge "Log options at debug when starting API services under wsgi"

This commit is contained in:
Zuul 2018-02-01 21:27:09 +00:00 committed by Gerrit Code Review
commit 9301a57862
2 changed files with 14 additions and 2 deletions

View File

@ -19,6 +19,7 @@ import os
import os.path
from oslo_log import log as logging
from oslo_service import _options as service_opts
from nova.api.openstack.placement import deploy
from nova import conf
@ -55,8 +56,12 @@ def init_application():
# initialize the logging system
setup_logging(conf.CONF)
# dump conf if we're at debug
if conf.CONF.debug:
# dump conf at debug (log_options option comes from oslo.service)
# FIXME(mriedem): This is gross but we don't have a public hook into
# oslo.service to register these options, so we are doing it manually for
# now; remove this when we have a hook method into oslo.service.
conf.CONF.register_opts(service_opts.service_opts)
if conf.CONF.log_options:
conf.CONF.log_opt_values(
logging.getLogger(__name__),
logging.DEBUG)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
The ``[DEFAULT]/log_options`` configuration option can be used to log
configuration options at DEBUG level when the `placement-api` and/or
`nova-api` services are started under WSGI. The default behavior is to
log options on startup.