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

Merge pull request #1078 from ModischFabrications/patch-1

Hide token from debug logs
This commit is contained in:
Badiboy 2021-01-17 12:21:42 +03:00 committed by GitHub
commit 9c2d279806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ def _make_request(token, method_name, method='get', params=None, files=None):
else:
request_url = "https://api.telegram.org/bot{0}/{1}".format(token, method_name)
logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files))
logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files).replace(token, token.split(':')[0] + ":{TOKEN}"))
read_timeout = READ_TIMEOUT
connect_timeout = CONNECT_TIMEOUT
if files and format_header_param: