1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #305 from MonsterDeveloper/patch-2

Added option to disable CherryPy logging
This commit is contained in:
FrankWang 2017-06-02 16:13:56 +08:00 committed by GitHub
commit 4b165ba3f1

View File

@ -73,6 +73,11 @@ bot.remove_webhook()
bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH, bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH,
certificate=open(WEBHOOK_SSL_CERT, 'r')) 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 # Start cherrypy server
cherrypy.config.update({ cherrypy.config.update({
'server.socket_host': WEBHOOK_LISTEN, 'server.socket_host': WEBHOOK_LISTEN,