Skip to content

fix(hu): name the hu target in the default log filter - #317

Merged
YuanYuYuan merged 1 commit into
mainfrom
fix/hu-log-target
Aug 21, 2026
Merged

YuanYuYuan merged 1 commit into
mainfrom
fix/hu-log-target

Conversation

@YuanYuYuan

Copy link
Copy Markdown
Collaborator

Slice 1 of 5, splitting #311. Independent of the other four.

What this does

Adds the hu target to the default log filter.

What fails without this

The binary target is named hu, so every tracing:: call in hiroz-union emits under the hu target. The default filter named only hiroz and zenoh. With RUST_LOG unset, the host emitted its own warnings and then discarded them.

before after
default filter, quiet hiroz=info,zenoh=warn hu=info,hiroz=info,zenoh=warn
default filter, --debug hiroz=debug,zenoh=debug hu=debug,hiroz=debug,zenoh=debug
a host warning, RUST_LOG unset emitted, then dropped reaches the terminal
RUST_LOG set honoured honoured — unchanged

The whole fix is one string literal, which is the kind of line a later edit drops without noticing. defaults_name_the_hu_target_and_parse asserts both defaults name the target and parse.

Breaking changes

None. A user who sets RUST_LOG sees no change.

The binary target is named `hu`, so every `tracing::` call in the
hiroz-union crate emits under the `hu` target. The default filter named
only `hiroz` and `zenoh`, so with RUST_LOG unset the host's own warnings
were emitted and then discarded before reaching a terminal.

The whole fix is one string literal. A unit test asserts the defaults
name the target and parse, because nothing else would catch its removal.
@YuanYuYuan
YuanYuYuan merged commit a4bd44c into main Aug 21, 2026
28 checks passed
@YuanYuYuan
YuanYuYuan deleted the fix/hu-log-target branch August 21, 2026 11:04
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