mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 07:06:26 +01:00
logging
This commit is contained in:
parent
a55df8b5e1
commit
71e73c3999
1 changed files with 11 additions and 1 deletions
|
@ -14,7 +14,17 @@ import sys
|
|||
from telegram import BotEventHandler
|
||||
from telegram.broadcaster import run_async
|
||||
from time import sleep
|
||||
import re
|
||||
import logging
|
||||
import sys
|
||||
|
||||
root = logging.getLogger()
|
||||
root.setLevel(logging.INFO)
|
||||
|
||||
ch = logging.StreamHandler(sys.stdout)
|
||||
ch.setLevel(logging.DEBUG)
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
ch.setFormatter(formatter)
|
||||
root.addHandler(ch)
|
||||
|
||||
last_chat_id = 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue