Add an admin-only server log viewer to the web UI
The root logger previously had no handler at all, so every module's logger.info() call (user creation, claims, password resets, ...) was silently dropped, not just unviewable. Adds a RotatingFileHandler writing into the existing /data volume so log content also survives container restarts/redeploys, plus /admin/logs (tail + line-count picker + full-file download) alongside the existing Users & Frames admin page.
This commit is contained in:
@@ -29,6 +29,10 @@ from pathlib import Path
|
||||
|
||||
_tmp_dir = tempfile.mkdtemp(prefix="espresso_frame_tests_")
|
||||
os.environ["DATABASE_URL"] = f"sqlite:///{Path(_tmp_dir) / 'test.db'}"
|
||||
# Same reasoning as DATABASE_URL above: logging_setup.configure_logging()
|
||||
# also runs as an app.main import-time side effect and would otherwise
|
||||
# try to create the real /data directory.
|
||||
os.environ["LOG_PATH"] = str(Path(_tmp_dir) / "server.log")
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
Reference in New Issue
Block a user