Skip to content

Map log levels explicitly to the LCH_LOG_* values#248

Merged
larsewi merged 1 commit into
masterfrom
explicit-log-level-mapping
Jun 26, 2026
Merged

Map log levels explicitly to the LCH_LOG_* values#248
larsewi merged 1 commit into
masterfrom
explicit-log-level-mapping

Conversation

@larsewi

@larsewi larsewi commented Jun 26, 2026

Copy link
Copy Markdown
Owner

The logger cast the log crate's Level discriminant directly to the C level, relying on an ordering the crate does not guarantee as a stable ABI. This adds LCH_LOG_* constants in ffi.rs and matches on Level explicitly, pinning the mapping in leech2's own code. Behavior-preserving.

🤖 Generated with Claude Code

The logger cast the log crate's Level discriminant directly to the C
level, relying on an ordering the crate does not guarantee as an ABI. Add
LCH_LOG_* constants in ffi.rs and match on Level explicitly so the
mapping is pinned in leech2's own code.

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@larsewi larsewi marked this pull request as ready for review June 26, 2026 12:03
@larsewi larsewi merged commit 828732d into master Jun 26, 2026
7 of 10 checks passed
@larsewi larsewi deleted the explicit-log-level-mapping branch June 26, 2026 12:11
@larsewi larsewi added the chore Internal change, excluded from release notes label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Internal change, excluded from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant