()
| 16 | |
| 17 | #[cfg(feature = "spantrace")] |
| 18 | fn setup_tracing() { |
| 19 | static ONCE: std::sync::Once = std::sync::Once::new(); |
| 20 | ONCE.call_once(|| { |
| 21 | tracing::subscriber::set_global_default( |
| 22 | tracing_subscriber::Registry::default().with(ErrorLayer::default()), |
| 23 | ) |
| 24 | .expect("Could not set tracing subscriber"); |
| 25 | }); |
| 26 | } |
| 27 | |
| 28 | #[cfg(not(feature = "spantrace"))] |
| 29 | const fn setup_tracing() {} |