efc4ed6baf
FEAT: added the basic .env as well as a sample.env to allow people to clone FEAT: Stores birthdays in SQL. REF: Still need to add GDPR and other privacy related code.
20 lines
525 B
Python
20 lines
525 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/EONA.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("EONA")
|
|
logger.addHandler(handler)
|
|
logger.setLevel(logging.INFO)
|