Improve logging: named logger, rotation, richer format, remove use_log guards
- 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
This commit is contained in:
1 parent
4416ebd924
commit
ab30d69c7c
6 files changed
+147
-65
No files matched your search
@@ -8,6 +8,9 @@ password = "pass"
|
||||
use_log = true
|
||||
log_level = "INFO"
|
||||
log_path = "./qc.log"
|
||||
# Optional: log rotation (defaults shown)
|
||||
log_max_bytes = 5000000
|
||||
log_backup_count = 3
|
||||
|
||||
[app_tags]
|
||||
protected_tag = "ipt"
|
||||
|
||||
Reference in new issue
Block a user