Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Bringing Live Application Logs to Reel Quick

说明与用途

Reel Quick 实现了集中式的实时日志查看器。FastAPI 和 worker 的日志写入 Redis Streams,并通过 SSE 流式传输到前端。这简化了分布式系统的调试。

问题

Debugging a distributed system with FastAPI, asynchronous workers, Redis, and Next.js requires checking multiple terminals and service logs, making it difficult to correlate events.

结果

Implemented a centralized, real-time log viewer that aggregates structured logs from backend and workers via Redis Streams and SSE, improving debugging efficiency and operational visibility.

工作流

  • FastAPI backend and workers write structured Python log events to the Redis Stream 'reelquick:system:logs'.
  • Each event includes timestamp, severity, service, source, message, and context (e.g., video/job ID).
  • The Next.js server proxies protected FastAPI log endpoints to the browser, keeping Redis credentials server-side.
  • The frontend loads recent history from Redis Streams and maintains live updates via Server-Sent Events (SSE).
  • Users filter logs by severity (debug, info, warning, error, critical) and service (backend, workers).
  • Users expand exception details to inspect failure contexts.

证据

Reel Quick now writes structured Python log events to the Redis Stream reelquick:system:logs.

来源

The Next.js server proxies the protected FastAPI log endpoints, which means the browser never receives Redis credentials or the logging API key.

来源

  • 记录日期: 2026-09-08T08:32:58.476Z