Repository navigation
logs: Add a LogLevel option for the runtime logs - #234
Merged
Merged
Conversation
The runtime logs are always written at INFO level unless mirrorbits is started with -debug. Busy instances may want fewer messages (WARNING or ERROR), while DEBUG is useful to troubleshoot a production instance without changing how it is started. Add a LogLevel option accepting CRITICAL, ERROR, WARNING, NOTICE, INFO or DEBUG (case-insensitive), defaulting to INFO. An invalid value is rejected when the configuration is loaded. The level is also applied on SIGHUP when logging to the console, and -debug still takes precedence. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
|
LGTM |
Contributor
|
+1 from me. @jbkempf is there a way that GitHub runs a pipeline? Do you need to manually kick it maybe (I see "1 workflow awaiting approval" above). Not familiar with GitHub so I really don't know. |
Collaborator
Done ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime logs are always written at INFO level unless the daemon is started with
-debug. This adds aLogLeveloption so the verbosity can be set inmirrorbits.conf:CRITICAL,ERROR,WARNING,NOTICE,INFOorDEBUG(case-insensitive), defaults toINFO, so nothing changes for existing setups.SIGHUPtoo, including when logging to the console (where the logger itself is not reopened).-debugstill takes precedence.Context: Team Kodi has carried a similar patch in its fork (xbmc/mirrorbits@518b968) to run mirrors.kodi.tv. This is a cleaner version against current master, so the fork can eventually go away.
Tests:
make testpasses forconfigandlogs, with a newTestConfiguredLogLevel.http/TestMirrorHandler3xxfails here, but it fails the same way on master without this change.🤖 Generated with Claude Code