Skip to content

logs: Add a LogLevel option for the runtime logs - #234

Merged
jbkempf merged 1 commit into
videolabs:masterfrom
clementperon:config-loglevel
Oct 20, 2026
Merged

jbkempf merged 1 commit into
videolabs:masterfrom
clementperon:config-loglevel

Conversation

@clementperon

Copy link
Copy Markdown
Contributor

The runtime logs are always written at INFO level unless the daemon is started with -debug. This adds a LogLevel option so the verbosity can be set in mirrorbits.conf:

  • Accepts CRITICAL, ERROR, WARNING, NOTICE, INFO or DEBUG (case-insensitive), defaults to INFO, so nothing changes for existing setups.
  • An invalid value is rejected when the configuration is loaded.
  • The level is applied on SIGHUP too, including when logging to the console (where the logger itself is not reopened).
  • -debug still 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 test passes for config and logs, with a new TestConfiguredLogLevel. http/TestMirrorHandler3xx fails here, but it fails the same way on master without this change.

🤖 Generated with Claude Code

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>
@jbkempf

jbkempf commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

LGTM

@elboulangero

Copy link
Copy Markdown
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.

@jbkempf

jbkempf commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

+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.

Done ✅

@jbkempf
jbkempf merged commit c5f4bdc into videolabs:master Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants