Improve logging: named logger, rotation, richer format #62

Merged
jblu merged 1 commits from logging-improvement into main 2026-10-27 00:31:29 -05:00
Owner

Implements the logging improvement plan.

Changes

  • Add setup_logging() returning a named qbit-maid logger with a RotatingFileHandler (configurable size/backups) and a console handler
  • Add log_torrent() helper for structured torrent context
  • Replace basicConfig-based tor_log() with setup_logging()
  • Remove redundant if self.use_log: guards across qbit-maid.py, qlist.py, qprocess.py, qlogging.py
  • Document new logging options in config.toml.example and README.md

Verification

  • All modules compile
  • All 27 existing tests pass
  • Smoke-tested named logger, rotation, structured logging, disabled mode, idempotent setup
Implements the logging improvement plan. ## Changes - Add `setup_logging()` returning a named `qbit-maid` logger with a `RotatingFileHandler` (configurable size/backups) and a console handler - Add `log_torrent()` helper for structured torrent context - Replace `basicConfig`-based `tor_log()` with `setup_logging()` - Remove redundant `if self.use_log:` guards across `qbit-maid.py`, `qlist.py`, `qprocess.py`, `qlogging.py` - Document new logging options in `config.toml.example` and `README.md` ## Verification - All modules compile - All 27 existing tests pass - Smoke-tested named logger, rotation, structured logging, disabled mode, idempotent setup
jblu added 1 commit 2026-10-26 22:11:39 -05:00
- Add setup_logging() returning a named 'qbit-maid' logger with
  RotatingFileHandler (configurable size/backups) and a console handler
- Add log_torrent() helper for structured torrent context
- Replace basicConfig-based tor_log() with setup_logging()
- Remove redundant 'if self.use_log:' guards across qbit-maid.py,
  qlist.py, qprocess.py, qlogging.py (level filtering handles it)
- Document new logging options in config.toml.example and README
jblu merged commit ebec893a85 into main 2026-10-27 00:31:29 -05:00
jblu deleted branch logging-improvement 2026-10-27 00:31:29 -05:00
Sign in to join this conversation.