Summary
Some idle-mode and idle-shared code paths can run before the tracing dispatcher is initialized.
In those paths, direct info!, warn!, and error! calls may not be visible, which hurts operational observability.
Please switch those logs to info_or_print!, warn_or_print!, and error_or_eprint! so logs remain visible regardless of tracing initialization state.
Background
init_tracing() is executed inside run() after configuration loading. Therefore, at the point when the process enters idle mode, tracing may not have been initialized yet.
The following events can occur during idle mode and therefore require pre-tracing log visibility:
- TLS reload (SIGHUP) and Shutdown (SIGINT/SIGTERM): include all related code paths from signal registration/reception to main-loop handling and idle-mode transition/exit behavior.
Scope
src/logging.rs
- If needed, add a
warn_or_print! macro with the same fallback behavior as info_or_print! and error_or_eprint!.
- Replace direct
info!/warn!/error! in idle-only or idle-shared paths that may run pre-tracing
Acceptance Criteria
- In pre-tracing state, logs from the targeted idle/shared paths are still printed to stdout/stderr.
- With tracing initialized, logs continue to go through tracing as before.
- TLS reload and shutdown control flow remains unchanged.
- No behavioral regression; build/tests pass.
Summary
Some idle-mode and idle-shared code paths can run before the tracing dispatcher is initialized.
In those paths, direct
info!,warn!, anderror!calls may not be visible, which hurts operational observability.Please switch those logs to
info_or_print!,warn_or_print!, anderror_or_eprint!so logs remain visible regardless of tracing initialization state.Background
init_tracing()is executed insiderun()after configuration loading. Therefore, at the point when the process enters idle mode, tracing may not have been initialized yet.The following events can occur during idle mode and therefore require pre-tracing log visibility:
Scope
src/logging.rswarn_or_print!macro with the same fallback behavior asinfo_or_print!anderror_or_eprint!.info!/warn!/error!in idle-only or idle-shared paths that may run pre-tracingAcceptance Criteria