diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-09 16:28:12 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-09 16:28:12 -0600 |
| commit | 5abf4b1db876161ef028398c9d600dd5ab9f6f6e (patch) | |
| tree | 8f468e35ef7bc904f571e84e08fc4a4db8e5c5e3 /tests/support/common.rs | |
| parent | f60bebf044f3614f5675152718ecebe81bd8459a (diff) | |
test: extract common test setup to initialize logger
Diffstat (limited to 'tests/support/common.rs')
| -rw-r--r-- | tests/support/common.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/support/common.rs b/tests/support/common.rs new file mode 100644 index 00000000..8db5c52b --- /dev/null +++ b/tests/support/common.rs @@ -0,0 +1,12 @@ +use std::sync::Once; + +static INIT: Once = Once::new(); + +pub fn setup() { + INIT.call_once(|| { + tracing_subscriber::fmt() + .with_test_writer() + .with_max_level(tracing::Level::WARN) + .init(); + }); +} |
