fixxed error with log dir
This commit is contained in:
parent
633a30180c
commit
f036781c43
4
app.py
4
app.py
@ -7,6 +7,10 @@ from logging.handlers import TimedRotatingFileHandler
|
||||
from datetime import datetime, timedelta
|
||||
from flask import Flask, render_template, redirect, url_for, send_from_directory, request, jsonify
|
||||
|
||||
# Logging-Verzeichnis (muss VOR cleanup_old_log_dirs definiert werden!)
|
||||
LOG_DIR = 'logs'
|
||||
os.makedirs(LOG_DIR, exist_ok=True)
|
||||
|
||||
# ── Cleanup Log-Files ────────────────────────────────────────────────────────────────
|
||||
def cleanup_old_log_dirs(max_age_days=90):
|
||||
"""Löscht Monatsordner in logs/, die älter als max_age_days sind"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user