Initialize logger for rpc-server and wsgi script
Currently logger is not properly initialized according to config options or process arguments when the neutron-rpc-server script or the api wsgi script is used. Because of this neutron does not generate the log files as expected when we deploy api using WSGI and use neutron-rpc-server, instead of the monolithic neutron-server. This ensures the logger is initialized even when these two scripts are used. Closes-Bug: #2030904 Related-Bug: #1693691 Change-Id: I13bcd36c237555e0ca60d5ffc214b8f3bf6e478f
This commit is contained in:
parent
cbb89fdb14
commit
afcce6d749
|
@ -53,6 +53,7 @@ def _init_configuration():
|
|||
conf_files = _get_config_files()
|
||||
config.register_common_config_options()
|
||||
config.init(sys.argv[1:], default_config_files=conf_files)
|
||||
config.setup_logging()
|
||||
config.set_config_defaults()
|
||||
if not cfg.CONF.config_file:
|
||||
sys.exit(_("ERROR: Unable to find configuration file via the default"
|
||||
|
|
|
@ -75,8 +75,6 @@ class NeutronApiService(WsgiService):
|
|||
|
||||
@classmethod
|
||||
def create(cls, app_name='neutron'):
|
||||
# Setup logging early
|
||||
config.setup_logging()
|
||||
service = cls(app_name)
|
||||
return service
|
||||
|
||||
|
|
Loading…
Reference in New Issue