This commit is contained in:
Mateusz Gruszczyński
2026-05-31 13:04:05 +02:00
parent 5fbc2428b6
commit b6a5003f2c
31 changed files with 146 additions and 251 deletions
+1 -4
View File
@@ -8,7 +8,7 @@ from typing import Any
from flask import Flask, g, request
from .config import LOG_DIR, LOG_ENABLE, LOG_RETENTION_HOURS
from .config import LOG_DIR, LOG_RETENTION_HOURS
_CONFIGURED = False
@@ -33,9 +33,6 @@ def _make_handler(path: Path, level: int) -> TimedRotatingFileHandler:
def configure_logging(app: Flask | None = None) -> None:
"""Route pyTorrent app, error and access logs to the configured data log directory."""
global _CONFIGURED
if not LOG_ENABLE:
# Note: Installation can disable file logging while keeping normal service stdout/stderr available.
return
LOG_DIR.mkdir(parents=True, exist_ok=True)
if not _CONFIGURED: