From: Adam King Date: Thu, 18 Nov 2021 23:54:33 +0000 (-0500) Subject: mgr/cephadm: Do not propogate access logs from cherrypy X-Git-Tag: v17.1.0~307^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F44017%2Fhead;p=ceph.git mgr/cephadm: Do not propogate access logs from cherrypy The only messages we're really interested in are errors that would come from the error logs. The acces logs only provide messages like - [18/Nov/2021:23:55:32] "POST /data HTTP/1.1" 200 - "" "Python-urllib/3.8" which we don't want spammed to the log, especially since they are logged at INFO level Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/agent.py b/src/pybind/mgr/cephadm/agent.py index 624c3b2015472..9728ba6681ebd 100644 --- a/src/pybind/mgr/cephadm/agent.py +++ b/src/pybind/mgr/cephadm/agent.py @@ -39,8 +39,8 @@ def cherrypy_filter(record: logging.LogRecord) -> int: return not any([m for m in blocked if m in msg]) -logging.getLogger('cherrypy.access').addFilter(cherrypy_filter) logging.getLogger('cherrypy.error').addFilter(cherrypy_filter) +cherrypy.log.access_log.propagate = False class CherryPyThread(threading.Thread):