Merge "Log options at debug when starting API services under wsgi"
This commit is contained in:
commit
9301a57862
@ -19,6 +19,7 @@ import os
|
|||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
from oslo_service import _options as service_opts
|
||||||
|
|
||||||
from nova.api.openstack.placement import deploy
|
from nova.api.openstack.placement import deploy
|
||||||
from nova import conf
|
from nova import conf
|
||||||
@ -55,8 +56,12 @@ def init_application():
|
|||||||
# initialize the logging system
|
# initialize the logging system
|
||||||
setup_logging(conf.CONF)
|
setup_logging(conf.CONF)
|
||||||
|
|
||||||
# dump conf if we're at debug
|
# dump conf at debug (log_options option comes from oslo.service)
|
||||||
if conf.CONF.debug:
|
# 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(
|
conf.CONF.log_opt_values(
|
||||||
logging.getLogger(__name__),
|
logging.getLogger(__name__),
|
||||||
logging.DEBUG)
|
logging.DEBUG)
|
||||||
|
@ -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.
|
Loading…
x
Reference in New Issue
Block a user