fix(log): redirect mpv stderr to log file instead of --log-file#6
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
Changesmpv logging configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bin/menutube.5s.sh`:
- Line 436: The current stderr redirection `2>"$LOG"` in the menutube startup
line truncates the log file on each launch; change it to append instead by
replacing `2>"$LOG"` with `2>>"$LOG"` (or use a shell-appropriate append form
like `&>>"$LOG"` if you want both stdout/stderr appended) so debug logs are
preserved across stop/play cycles and diagnostic context is retained.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
The previous default-mode `--msg-level=all=info,ipc=warn,ffmpeg=warn` did not stop mpv from filling the log with per-poll IPC chatter at level v. Two reasons: 1. mpv's `--log-file` ignores `--msg-level` entirely and always writes at internal verbose level — so any per-module override on msg-level has no effect on file output. 2. mpv 0.41 does not have `--log-file-level` either (option not found). The only working knob is the stderr stream, which DOES respect msg-level. Drop `--log-file=$LOG` and redirect mpv's stderr into the log instead (`2>"$LOG"` in the launcher). Default mode log now starts at 0 bytes and grows only with info+ entries; debug mode (msg-level=all=v) gets full verbosity as before. Isolated test: mpv idle + 10 IPC polls produced 0 bytes after the fix vs ~600 lines pre-fix. Live re-test on the menutube install confirmed 0 bytes / 0 lines after restart. Adds `ao=v` to default msg-level so the useful audio-device-selection diagnostic line still shows up in the default log.
a91497c to
c61af95
Compare
Summary
The default-mode log was still filling with per-poll IPC chatter despite my v0.5 PR setting
--msg-level=…,ipc=warn,…. Two reasons:--log-filewrites at internal verbose level regardless of--msg-level. Any per-module override there has zero effect on file output.--log-file-level(option not found). The flag I'd have used doesn't exist on this version.The only knob that actually respects
--msg-levelis mpv's stderr stream. So this PR drops--log-file=$LOGand redirects mpv's stderr into the log instead:Also adds
ao=vto the default msg-level so the genuinely-useful audio-device-selection lines (e.g.selected audio output device: UGREEN-BT505) still surface in the default-mode log.Validation
./scripts/check.shgreen;coderabbit --plainclean after removing a deadlocal log_leveldeclaration that an earlier draft of this fix left behind.Bump
feat:would befeat:but this isfix:→ patch bump (v0.5.0 → v0.5.1) once squash-merged.Summary by CodeRabbit