feat!: require --enable-logging flag to install tracing subscriber#65
Open
mickvandijke wants to merge 1 commit intorc-2026.4.1from
Open
feat!: require --enable-logging flag to install tracing subscriber#65mickvandijke wants to merge 1 commit intorc-2026.4.1from
mickvandijke wants to merge 1 commit intorc-2026.4.1from
Conversation
Even with the `logging` feature compiled in (the default), the tracing subscriber is now only installed when the user passes `--enable-logging` (or sets `ANT_ENABLE_LOGGING=1`). Without the flag, ant-node and ant-devnet emit zero log output. The remaining `--log-*` options are ignored unless the flag is set. BREAKING CHANGE: Default builds no longer log to stdout automatically. Operators that relied on implicit logging must now pass `--enable-logging` (or set `ANT_ENABLE_LOGGING=1`). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--enable-loggingflag (env:ANT_ENABLE_LOGGING) to bothant-nodeandant-devnet. Without it, the tracing subscriber is never installed and no log records are emitted, even when the binary is built with theloggingfeature.--log-level/--log-format/--log-dir/--log-max-filesoptions are ignored unless--enable-loggingis set.tracing_subscriberusestatements inant-node/main.rsto file scope per the project's "imports at module level only" rule.Why
Previously, default builds (which include the
loggingfeature) auto-installed a stdout subscriber, so any invocation ofant-nodeprinted logs whether the operator wanted them or not. Logging output should be opt-in at runtime, not just at build time.BREAKING CHANGE
Default builds no longer log to stdout automatically. Operators that relied on implicit logging must now pass
--enable-logging(or setANT_ENABLE_LOGGING=1).Test plan
cargo build --bin ant-node --bin ant-devnet(default features)cargo build --bin ant-node --bin ant-devnet --no-default-featurescargo clippy --bins --all-features -- -D warningscargo fmt --all -- --check./ant-node --rewards-address 0x0…produces 0 lines of output./ant-node --enable-logging --rewards-address 0x0…produces normal tracing output🤖 Generated with Claude Code