Merge "Avoid printing log options multiple times"
This commit is contained in:
commit
f559d86218
@ -14,7 +14,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging as std_logging
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
||||||
@ -92,8 +91,6 @@ class NeutronApiService(WsgiService):
|
|||||||
# Log the options used when starting if we're in debug mode...
|
# Log the options used when starting if we're in debug mode...
|
||||||
|
|
||||||
config.setup_logging()
|
config.setup_logging()
|
||||||
# Dump the initial option values
|
|
||||||
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
|
|
||||||
service = cls(app_name)
|
service = cls(app_name)
|
||||||
return service
|
return service
|
||||||
|
|
||||||
@ -186,8 +183,6 @@ def _run_wsgi(app_name):
|
|||||||
server = wsgi.Server("Neutron")
|
server = wsgi.Server("Neutron")
|
||||||
server.start(app, cfg.CONF.bind_port, cfg.CONF.bind_host,
|
server.start(app, cfg.CONF.bind_port, cfg.CONF.bind_host,
|
||||||
workers=_get_api_workers())
|
workers=_get_api_workers())
|
||||||
# Dump all option values here after all options are parsed
|
|
||||||
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
|
|
||||||
LOG.info(_LI("Neutron service started, listening on %(host)s:%(port)s"),
|
LOG.info(_LI("Neutron service started, listening on %(host)s:%(port)s"),
|
||||||
{'host': cfg.CONF.bind_host, 'port': cfg.CONF.bind_port})
|
{'host': cfg.CONF.bind_host, 'port': cfg.CONF.bind_port})
|
||||||
return server
|
return server
|
||||||
|
@ -19,6 +19,7 @@ Utility methods for working with WSGI servers
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
|
import logging as std_logging
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
import ssl
|
import ssl
|
||||||
@ -238,6 +239,8 @@ class Server(object):
|
|||||||
if workers < 1:
|
if workers < 1:
|
||||||
# The API service should run in the current process.
|
# The API service should run in the current process.
|
||||||
self._server = service
|
self._server = service
|
||||||
|
# Dump the initial option values
|
||||||
|
cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
|
||||||
service.start()
|
service.start()
|
||||||
systemd.notify_once()
|
systemd.notify_once()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user