Skip to content

MMCore: separate level setting for stderr and primary log file#909

Merged
marktsuchida merged 3 commits intomicro-manager:mainfrom
marktsuchida:corelog-stderr-level
Apr 7, 2026
Merged

MMCore: separate level setting for stderr and primary log file#909
marktsuchida merged 3 commits intomicro-manager:mainfrom
marktsuchida:corelog-stderr-level

Conversation

@marktsuchida
Copy link
Copy Markdown
Member

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 the CMMCore API.

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

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.)
@marktsuchida marktsuchida merged commit 85901d5 into micro-manager:main Apr 7, 2026
16 checks passed
@marktsuchida marktsuchida deleted the corelog-stderr-level branch April 7, 2026 20:28
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.

1 participant