add logging

This commit is contained in:
zxce3 2021-09-13 15:24:41 +07:00
parent 07c5406484
commit cb727e36c3

14
helpers/loggings.py Normal file
View File

@ -0,0 +1,14 @@
import logging
import time
logging.basicConfig(
filename='bot.log',
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
logging.getLogger("pyrogram").setLevel(logging.ERROR)
logging.getLogger("PyTgCalls").setLevel(logging.WARNING)
logging.getLogger("youtube_dl").setLevel(logging.WARNING)
LOG = logging.getLogger(__name__)