Elysia/logger.py
Dan 14ba9ceb98 REF: Changed EONA to Elysia
DOC: Added Elysia's image
DOC: Updated everything to reflected the new naming.
2024-08-12 21:23:02 -04:00

20 lines
529 B
Python

import logging
from logging.handlers import RotatingFileHandler
logging.basicConfig(
level=logging.ERROR,
format="%(asctime)s - %(name)s - " "%(levelname)s - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
log_file = "logs/Elysia.log"
handler = RotatingFileHandler(log_file, maxBytes=1e6, backupCount=5)
formatter = logging.Formatter(
"%(asctime)s:%(levelname)s:%(name)s: %(message)s")
handler.setFormatter(formatter)
logger = logging.getLogger("Elysia")
logger.addHandler(handler)
logger.setLevel(logging.INFO)