feat(cmd): bridge slog level to the glog -v flag#3944
Conversation
slog (used by the live runner registry, trickle, ai/worker, and media) ran at its default Info level with no way to enable Debug, so every slog.Debug line was dropped regardless of -v. Enable slog Debug at -v 6 (the documented max verbosity) so the existing flag also controls slog output.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthrough
ChangesLogging Verbosity Bridge
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 14 UNAVAILABLE: read ECONNRESET Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3944 +/- ##
===================================================
+ Coverage 33.30014% 33.33175% +0.03161%
===================================================
Files 171 171
Lines 42174 42176 +2
===================================================
+ Hits 14044 14058 +14
+ Misses 27077 27064 -13
- Partials 1053 1054 +1
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
What
Enable slog
Debugoutput at-v 6, so the existing glog verbosity flag also controls slog.Why
go-livepeer uses two loggers: older code on
glog(driven by-v), and newer subsystems (live runner registry,trickle/,ai/worker/,media/) on the stdliblog/slog. Nothing ever set slog's level, so it sat atInfoand everyslog.Debugline was dropped regardless of-v— no way to turn them on.This bridges them:
-v 6(the documented max verbosity, already used viaglog.V(6)for the deepest logging) now also enables slogDebug. Works because nothing callsslog.SetDefault, so the package-levelslog.Debug/slog.Infocalls flow through the default handler thatSetLogLoggerLevelcontrols. The check runs right aftervFlag.Value.Set(*verbosity), the line that applies-vto glog, so it reads the configured value.Interim by design — the long-term direction is migrating off glog onto slog, at which point this goes away. For now it makes the newer slog code usable with the flag operators already know.
Checklist:
makeruns successfully./test.shpassSummary by CodeRabbit
Summary by CodeRabbit