Skip to content

Commit

Permalink
compute_ctl: enable tracing panic hook (#4375)
Browse files Browse the repository at this point in the history
compute_ctl can panic, but `tracing` is used for logging. panic stderr
output can interleave with messages from normal logging. The fix is to
use the established way (pageserver, safekeeper, storage_broker) of using
`tracing` to report panics.
  • Loading branch information
koivunej authored Jun 1, 2023
1 parent 3300836 commit 36fee50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compute_tools/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ pub fn init_tracing_and_logging(default_log_level: &str) -> anyhow::Result<()> {
.init();
tracing::info!("logging and tracing started");

utils::logging::replace_panic_hook_with_tracing_panic_hook().forget();

Ok(())
}

1 comment on commit 36fee50

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1071 tests run: 1024 passed, 0 failed, 47 skipped (full report)


The comment gets automatically updated with the latest test results
36fee50 at 2023-06-01T18:30:10.924Z :recycle:

Please sign in to comment.