fixxed logging NameError

This commit is contained in:
oberon 2026-02-16 14:06:12 +01:00
parent 174e64e480
commit 22e6071240
2 changed files with 6 additions and 4 deletions

View File

@ -4,8 +4,10 @@ import os
import shutil import shutil
from logging.handlers import TimedRotatingFileHandler from logging.handlers import TimedRotatingFileHandler
from datetime import datetime, timedelta from datetime import datetime, timedelta
from config import Config
LOG_DIR = app.config['LOG_DIR'] #LOG_DIR = app.config['LOG_DIR']
LOG_DIR = Config.LOG_DIR
os.makedirs(LOG_DIR, exist_ok=True) os.makedirs(LOG_DIR, exist_ok=True)
def cleanup_old_log_dirs(max_age_days=90): def cleanup_old_log_dirs(max_age_days=90):

View File

@ -3,6 +3,6 @@ import os
class Config: class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-change-me' SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-change-me'
CONFIG_DIR = 'configs' CONFIG_DIR = os.path.join(os.path.dirname(__file__), '..', 'configs')
LOG_DIR = 'logs' LOG_DIR = os.path.join(os.path.dirname(__file__), '..', 'logs')
SOUNDS_DIR = 'sounds' SOUNDS_DIR = os.path.join(os.path.dirname(__file__), '..', 'sounds')