MMCore: separate level setting for stderr and primary log file#909
Merged
marktsuchida merged 3 commits intomicro-manager:mainfrom Apr 7, 2026
Merged
Conversation
Instead of stderr using the same log level as setPrimaryLogLevel(), use a separate settings. This gives full control of the log level for every log sink (primary, secondaries, stderr) via the CMMCore API. Existing code using enableDebugLog() is unaffected. Changes behavior of setPrimaryLogLevel() but only bumping minor version because I consider it a bug fix (stderr should not be affected by "primary" log level). (Assisted by Claude Code; any errors are mine.)
That is, no gap between the log level switch of the primary file and stderr sink. This was the original behavior. Also reduces code duplication for the atomic swapping. (Assisted by Claude Code; any errors are mine.)
(Assisted by Claude Code; any errors are mine.)
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.
This is a follow-up to #906.
Instead of stderr using the same log level as
setPrimaryLogLevel()(#906), use a separate settings. This gives full control of the log level for every log sink (primary, secondaries, stderr) via theCMMCoreAPI.Existing code using
enableDebugLog()is unaffected and the level switches for stderr and the primary file together atomically (as it always has).Changes behavior of
setPrimaryLogLevel()(just added in #906) but only bumping minor version because I consider it a bug fix (stderr should not be affected by "primary" log level).