Changing the project to being called Nessa now

This commit is contained in:
Dan
2024-05-05 16:38:32 -04:00
parent e5a189d9cb
commit ce1d4626a8
12 changed files with 105 additions and 51 deletions

17
nessa/logger.py Normal file
View File

@@ -0,0 +1,17 @@
import logging
from logging.handlers import RotatingFileHandler
# Configure basic logger
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
# Create a rotating file handler which logs even debug messages
log_file = 'dolly.log'
handler = RotatingFileHandler(log_file, maxBytes=100000, backupCount=3)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger = logging.getLogger('Dolly')
logger.addHandler(handler)
logger.setLevel(logging.INFO)