From 401a848927ea69a59fe549c1efd4094a6085a831 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 7 Mar 2017 21:43:14 +0300 Subject: [PATCH] Added option to disable CherryPy logging --- examples/webhook_examples/webhook_cherrypy_echo_bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/webhook_examples/webhook_cherrypy_echo_bot.py b/examples/webhook_examples/webhook_cherrypy_echo_bot.py index 83c9a01..d0f3da0 100644 --- a/examples/webhook_examples/webhook_cherrypy_echo_bot.py +++ b/examples/webhook_examples/webhook_cherrypy_echo_bot.py @@ -73,6 +73,11 @@ bot.remove_webhook() bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH, certificate=open(WEBHOOK_SSL_CERT, 'r')) +# Disable CherryPy requests log +access_log = cherrypy.log.access_log +for handler in tuple(access_log.handlers): + access_log.removeHandler(handler) + # Start cherrypy server cherrypy.config.update({ 'server.socket_host': WEBHOOK_LISTEN,