]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Do not propogate access logs from cherrypy 44017/head
authorAdam King <adking@redhat.com>
Thu, 18 Nov 2021 23:54:33 +0000 (18:54 -0500)
committerAdam King <adking@redhat.com>
Thu, 2 Dec 2021 15:02:23 +0000 (10:02 -0500)
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 <adking@redhat.com>
src/pybind/mgr/cephadm/agent.py

index 624c3b20154725301012e62942fd1cdb864f1f68..9728ba6681ebd15de9608967606527ea73c9fd85 100644 (file)
@@ -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):