1
0
mirror of https://github.com/otter18/tg_logger.git synced 2026-04-24 19:03:43 +02:00

Update tg_logger.py

This commit is contained in:
ChernV
2021-01-01 16:24:50 +03:00
committed by GitHub
parent 3bdebb4661
commit 3c171f8cfb
+2 -2
View File
@@ -37,7 +37,7 @@ class TgLoggerHandler(StreamHandler):
t0 = time()
while time() - t0 < self.timeout:
try:
self.bot.send_message(user_id, msg)
self.bot.send_message(user_id, msg, parse_mode="HTML")
break
except Exception as ex:
logger.exception("Exception while sending %s to %s:", msg, user_id)
@@ -77,7 +77,7 @@ class TgFileLogger:
t0 = time()
while time() - t0 < self.timeout:
try:
self.bot.send_document(user_id, data=data, caption=caption)
self.bot.send_document(user_id, data=data, caption=caption, parse_mode="HTML")
logger.info("File %s successfully send to %s", file_path, user_id)
break
except Exception as ex: