Skip to content

Commit afc36a2

Browse files
committed
move webhook handler logs to logging at DEBUG level
1 parent 27e57bb commit afc36a2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

telegram/utils/webhookhandler.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,19 @@ def _get_content_len(self):
102102
if clen < 0:
103103
raise _InvalidPost(403)
104104
return clen
105+
106+
def log_message(self, format, *args):
107+
"""Log an arbitrary message.
108+
109+
This is used by all other logging functions.
110+
111+
It overrides ``BaseHTTPRequestHandler.log_message``, which logs to ``sys.stderr``.
112+
113+
The first argument, FORMAT, is a format string for the message to be logged. If the format
114+
string contains any % escapes requiring parameters, they should be specified as subsequent
115+
arguments (it's just like printf!).
116+
117+
The client ip and current date/time are prefixed to every message.
118+
"""
119+
120+
self.logger.debug("%s - - %s" % (self.address_string(), format % args))

0 commit comments

Comments
 (0)
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