Skip to content

logging: fix dead log_info!/log_warn! macros (route through tracing) - #286

Draft
TheNewAutonomy wants to merge 1 commit into
mainfrom
worktree-fix-dead-logger
Draft

logging: fix dead log_info!/log_warn! macros (route through tracing)#286
TheNewAutonomy wants to merge 1 commit into
mainfrom
worktree-fix-dead-logger

Conversation

@TheNewAutonomy

Copy link
Copy Markdown
Member

Summary

  • catalyst_utils::logging::get_logger() was hardcoded to always return None, so every log_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 whether init_logger() was ever called.
  • This was flagged as an outstanding follow-up in the 2026-08-19 quorum-stall investigation (only service.rs's diagnostic lines and main.rs were fixed at the time).
  • Fix: forward these macros straight to tracing (the mechanism that's already wired up process-wide via catalyst-cli's init_logging), carrying category as a structured field, instead of through the dead custom logger.

Test plan

  • cargo build --workspace and cargo build --workspace --examples — clean
  • cargo test -p catalyst-utils --lib — 38 passed
  • Standalone smoke test with a real tracing_subscriber confirms log_info!/log_warn! now emit real lines with the category field attached
  • Deploy to the live 4-node testnet and run scripts/catalyst_fleet_reset.sh --yesnot 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

… 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>
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