move logs to folder

This commit is contained in:
aronwk-aaron
2022-12-16 22:50:43 -06:00
parent 5e59d3b43c
commit 24fc6a0826
4 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ else:
from logging.handlers import RotatingFileHandler
gunicorn_logger = logging.getLogger('gunicorn.error')
app.logger.handlers = gunicorn_logger.handlers
file_handler = RotatingFileHandler('nexus_dashboard.log', maxBytes=1024 * 1024 * 100, backupCount=20)
file_handler = RotatingFileHandler('logs/nexus_dashboard.log', maxBytes=1024 * 1024 * 100, backupCount=20)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
file_handler.setFormatter(formatter)
app.logger.addHandler(file_handler)