From afc36a235bab2a0d377c9d7bba65f82c103388bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Mon, 11 Jul 2016 23:44:40 +0200 Subject: [PATCH 1/2] move webhook handler logs to logging at DEBUG level --- telegram/utils/webhookhandler.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/telegram/utils/webhookhandler.py b/telegram/utils/webhookhandler.py index 92ad280c5d8..672dbb6db44 100644 --- a/telegram/utils/webhookhandler.py +++ b/telegram/utils/webhookhandler.py @@ -102,3 +102,19 @@ def _get_content_len(self): if clen < 0: raise _InvalidPost(403) return clen + + def log_message(self, format, *args): + """Log an arbitrary message. + + This is used by all other logging functions. + + It overrides ``BaseHTTPRequestHandler.log_message``, which logs to ``sys.stderr``. + + The first argument, FORMAT, is a format string for the message to be logged. If the format + string contains any % escapes requiring parameters, they should be specified as subsequent + arguments (it's just like printf!). + + The client ip and current date/time are prefixed to every message. + """ + + self.logger.debug("%s - - %s" % (self.address_string(), format % args)) From f443003408aeff2eca3cefe0ebe77c5e97d25be6 Mon Sep 17 00:00:00 2001 From: Mikki Weesenaar Date: Tue, 12 Jul 2016 13:45:37 +0200 Subject: [PATCH 2/2] Small change in the documentation. --- telegram/utils/webhookhandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/utils/webhookhandler.py b/telegram/utils/webhookhandler.py index 672dbb6db44..9d23aef9cb7 100644 --- a/telegram/utils/webhookhandler.py +++ b/telegram/utils/webhookhandler.py @@ -114,7 +114,7 @@ def log_message(self, format, *args): string contains any % escapes requiring parameters, they should be specified as subsequent arguments (it's just like printf!). - The client ip and current date/time are prefixed to every message. + The client ip is prefixed to every message. """ self.logger.debug("%s - - %s" % (self.address_string(), format % args)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy