logging: fix dead log_info!/log_warn! macros (route through tracing) - #286
Draft
TheNewAutonomy wants to merge 1 commit into
Draft
logging: fix dead log_info!/log_warn! macros (route through tracing)#286TheNewAutonomy wants to merge 1 commit into
TheNewAutonomy wants to merge 1 commit into
Conversation
… dead CatalystLogger get_logger() was hardcoded to always return None, so every log_*! call across the whole codebase (consensus/phases.rs, producer.rs, network, storage, service-bus, config -- not just the sites already fixed in service.rs/main.rs during the 2026-08-19 quorum-stall investigation) was a silent no-op in production, regardless of whether init_logger() was ever called. tracing::info! is what's actually wired up process-wide via catalyst-cli's init_logging/ tracing_subscriber registry, so forward these macros straight to tracing (carrying category as a structured field) instead of through the broken custom logger. Verified live: a smoke-test binary with a tracing subscriber now shows real INFO/WARN lines from these macros with the category field attached. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
catalyst_utils::logging::get_logger()was hardcoded to always returnNone, so everylog_info!/log_warn!/log_error!/etc call across the codebase (consensus/phases.rs, producer.rs, network, storage, service-bus, config) was a silent no-op in production, independent of whetherinit_logger()was ever called.service.rs's diagnostic lines andmain.rswere fixed at the time).tracing(the mechanism that's already wired up process-wide viacatalyst-cli'sinit_logging), carryingcategoryas a structured field, instead of through the dead custom logger.Test plan
cargo build --workspaceandcargo build --workspace --examples— cleancargo test -p catalyst-utils --lib— 38 passedtracing_subscriberconfirmslog_info!/log_warn!now emit real lines with thecategoryfield attachedscripts/catalyst_fleet_reset.sh --yes— not done from this session (background job's network is HTTPS-only, no SSH egress to the testnet hosts); needs to be run from an interactive session with SSH access🤖 Generated with Claude Code