Hellbot / Hellbot /core /logger.py
Ufoptg's picture
Upload 87 files
cdce48f verified
raw
history blame contribute delete
500 Bytes
import logging
from logging.handlers import RotatingFileHandler
logging.basicConfig(
format="[%(asctime)s]:[%(name)s]:[%(levelname)s] - %(message)s",
level=logging.INFO,
datefmt="%H:%M:%S",
handlers=[
RotatingFileHandler(
"HellBot.log", maxBytes=(1024 * 1024 * 5), backupCount=10, encoding="utf-8"
),
logging.StreamHandler(),
],
)
logging.getLogger("pyrogram").setLevel(logging.ERROR)
LOGS = logging.getLogger("HellBot")