Skip to content

feat(tracing): add MUJINA_LOG filter variable#79

Merged
rkuester merged 1 commit into
256foundation:mainfrom
rkuester:feat-tracing-mujina-log
Jul 15, 2026
Merged

feat(tracing): add MUJINA_LOG filter variable#79
rkuester merged 1 commit into
256foundation:mainfrom
rkuester:feat-tracing-mujina-log

Conversation

@rkuester

Copy link
Copy Markdown
Collaborator

Add MUJINA_LOG, a log filter for Mujina's own output. Interpret its directives relative to Mujina's crate, overriding RUST_LOG and the built-in defaults. Give RUST_LOG its standard Rust meaning: a directive that names a crate adds to the built-in defaults, and a bare level takes full control of the filter.

MUJINA_LOG=trace               trace Mujina, nothing more
MUJINA_LOG=asic::bm13xx=trace  module names as the log shows them
RUST_LOG=nusb=trace            trace a dependency, defaults kept
RUST_LOG=trace                 trace everything, as stock Rust

Previously the filter appended a bare RUST_LOG level after the defaults, where the per-crate default outranked it by specificity: RUST_LOG=trace promoted third-party crates to trace but left Mujina capped at info, exactly backwards from what a user asking for a trace log wants.

Update the startup hint, environment help, and docs to recommend MUJINA_LOG.

Add MUJINA_LOG, a log filter for Mujina's own output. Interpret its
directives relative to Mujina's crate, overriding RUST_LOG and the
built-in defaults. Give RUST_LOG its standard Rust meaning: a
directive that names a crate adds to the built-in defaults, and a
bare level takes full control of the filter.

    MUJINA_LOG=trace               trace Mujina, nothing more
    MUJINA_LOG=asic::bm13xx=trace  module names as the log shows them
    RUST_LOG=nusb=trace            trace a dependency, defaults kept
    RUST_LOG=trace                 trace everything, as stock Rust

Previously the filter appended a bare RUST_LOG level after the
defaults, where the per-crate default outranked it by specificity:
RUST_LOG=trace promoted third-party crates to trace but left Mujina
capped at info, exactly backwards from what a user asking for a
trace log wants.

Update the startup hint, environment help, and docs to recommend
MUJINA_LOG.
@rkuester
rkuester force-pushed the feat-tracing-mujina-log branch from b2ab94a to 0c19e0f Compare July 15, 2026 02:49
@rkuester
rkuester enabled auto-merge July 15, 2026 02:50
@rkuester
rkuester added this pull request to the merge queue Jul 15, 2026
Merged via the queue into 256foundation:main with commit fbee2e5 Jul 15, 2026
1 check passed
@rkuester
rkuester deleted the feat-tracing-mujina-log branch July 15, 2026 03:06
@winterrdog

winterrdog commented Jul 16, 2026

Copy link
Copy Markdown

yeah, confirmed this makes investigating logs much easier.

i was using it while chasing down an issue around the power controller on a bitaxe gamma 602, and having targeted Mujina traces (for my case) without turning the rest of the world into trace made the debugging experience smoother

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.

2 participants