ready for public

This commit is contained in:
2025-04-01 12:13:39 -04:00
parent eb5d9bc3f9
commit 0754f332c9
12 changed files with 36 additions and 31 deletions

View File

@@ -4,15 +4,11 @@ from views.user_views import user
from views.group_views import group
from config import app_config
from database import init_app
import logging
import os, logging
from logging.handlers import RotatingFileHandler
import os
log_to_file = os.getenv('LOG_TO_FILE', 'false').lower() == 'true'
log_file_path = os.getenv('LOG_FILE_PATH', '/app/logs/app.log')
if log_to_file:
handler = RotatingFileHandler(log_file_path, maxBytes=1000000, backupCount=3)
if app.config['LOG_TO_FILE']:
handler = RotatingFileHandler(app.config['LOG_FILE_PATH'], maxBytes=1000000, backupCount=3)
handler.setLevel(logging.INFO)
app.logger.addHandler(handler)