Logging
AniBridge uses loguru for structured logs and a TerminalLogger to duplicate stdout/stderr to a session log file under data/.
Where to find logs
- Console output (colorized)
data/terminal-YYYY-MM-DD.log(color codes stripped)
Progress Rendering (TTY vs non‑TTY)
- Interactive terminals (TTY): AniBridge renders a live progress bar using
tqdmwith speed and ETA. - Non‑interactive (Docker, CI, logs): AniBridge logs one progress line every N percent (default 5%).
Environment toggles:
PROGRESS_FORCE_BAR: set totrueto force a bar even if stdout is not a TTY (useful under reloader pipes).PROGRESS_STEP_PERCENT: integer percent step for non‑TTY progress lines (default5).
Implementation notes:
- The
TerminalLoggertees stdout/stderr todata/terminal-*.log. - When a progress bar is active, its output is sent directly to the real terminal (not the tee), so the
.logfile is not flooded with redraw lines. - Non‑TTY runs never create a bar; only stepped log lines are written.
Controlling output
LOG_LEVEL: defaultINFO; useDEBUGfor deeper diagnostics.ANIBRIDGE_LOG_PATH: optional absolute path to the session log file.- The logger is initialized early;
.envis loaded before sinks are attached, soLOG_LEVELis honored.
Tips
- Check provider/language errors in downloader and probe logs
- Inspect Torznab with
t=capsandt=tvsearch - Tail the session log while debugging:
tail -f data/terminal-*.log