mod logging to with poisoning retry

This commit is contained in:
mfahampshire
2025-11-07 20:24:08 +00:00
parent ac13ddbda8
commit 59cbce50f7
3 changed files with 21 additions and 15 deletions
+7 -5
View File
@@ -274,11 +274,13 @@ impl MixtcpResponse {
}
fn init_logging() {
if tracing::dispatcher::has_been_set() {
return;
}
INIT.call_once(|| {
nym_bin_common::logging::setup_tracing_logger();
INIT.call_once_force(|state| {
if state.is_poisoned() {
eprintln!("Logger initialization was poisoned, retrying");
}
if !tracing::dispatcher::has_been_set() {
nym_bin_common::logging::setup_tracing_logger();
}
});
}