Skip to content

fix(ModuleUtils): Safeguard setMDCAdapter call for logback-android compatibility - #356

Open
CoreyAllenAudio wants to merge 1 commit into
opensensorhub:masterfrom
CoreyAllenAudio:fix/logback-mdc-upstream
Open

fix(ModuleUtils): Safeguard setMDCAdapter call for logback-android compatibility#356
CoreyAllenAudio wants to merge 1 commit into
opensensorhub:masterfrom
CoreyAllenAudio:fix/logback-mdc-upstream

Conversation

@CoreyAllenAudio

Copy link
Copy Markdown

ModuleUtils.createModuleLogger() throws NoSuchMethodError on Android, which kills
module init — the ConSys client module fails to start on every app launch.

osh-core compiles against logback-classic 1.5.13, which added
LoggerContext.setMDCAdapter() (0c56710). Android builds exclude real Logback and
substitute logback-android 3.0.0, built from the Logback 1.4.x generation, where that
method doesn't exist. Desktop nodes are unaffected.

Wraps the call in a NoSuchMethodError guard. Logback wired MDC globally before 1.5, so
skipping it restores the earlier behavior rather than dropping functionality. The guard
can be removed once logback-android ships a 1.5-based release.

Verified on an Android emulator: system registers and streams datastreams to a node.
kalynstricklin/osh-core#5 has already been reviewed and merged downstream.

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