Reduce amount of unhelpful debug logging in the API service

* Ignore DEBUG logging from keystone{auth,middleware}
* Log eventlet.wsgi events with a proper (default) logger name,
  so that DEBUG messages are also ignored
* Enable INFO logging for eventlet.wsgi.server, so that we still see summary
  of every request

Change-Id: I954a2b37bcedefb2c2b653b8ba26a030ffd7c5b7
This commit is contained in:
Dmitry Tantsur 2016-04-06 19:24:25 +02:00
parent 6d2d8b9523
commit cae3564ca0
3 changed files with 12 additions and 7 deletions

View File

@ -129,13 +129,15 @@ def prepare_service(argv=[]):
'sqlalchemy=WARNING',
'keystoneclient=INFO',
'stevedore=INFO',
'eventlet.wsgi.server=WARNING',
'eventlet.wsgi.server=INFO',
'iso8601=WARNING',
'paramiko=WARNING',
'requests=WARNING',
'neutronclient=WARNING',
'glanceclient=WARNING',
'urllib3.connectionpool=WARNING',
'keystonemiddleware.auth_token=INFO',
'keystoneauth.session=INFO',
])
config.parse_args(argv)
log.setup(CONF, 'ironic')
@ -168,8 +170,7 @@ class WSGIService(service.ServiceBase):
self.server = wsgi.Server(CONF, name, self.app,
host=CONF.api.host_ip,
port=CONF.api.port,
use_ssl=use_ssl,
logger_name=name)
use_ssl=use_ssl)
def start(self):
"""Start serving this service using loaded configuration.

View File

@ -32,8 +32,7 @@ class TestWSGIService(base.TestCase):
test_service.app,
host='0.0.0.0',
port=6385,
use_ssl=False,
logger_name=service_name)
use_ssl=False)
@mock.patch.object(service.wsgi, 'Server')
def test_workers_set_correct_setting(self, wsgi_server):
@ -64,5 +63,4 @@ class TestWSGIService(base.TestCase):
srv.app,
host='0.0.0.0',
port=6385,
use_ssl=True,
logger_name=service_name)
use_ssl=True)

View File

@ -0,0 +1,6 @@
---
other:
- Do not show DEBUG logging from keystoneauth and keystonemiddleware
by default.
- Log eventlet.wsgi.server events with a proper logger name and ignore DEBUG
logging by default.