From 7a634fd114876e500aa2ab7b6598f9ec9989eb6f Mon Sep 17 00:00:00 2001 From: Vince Buffalo Date: Sat, 19 Aug 2023 21:38:58 -0700 Subject: [PATCH] added logging support module --- src/logging_setup.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/logging_setup.rs diff --git a/src/logging_setup.rs b/src/logging_setup.rs new file mode 100644 index 0000000..c14ab4e --- /dev/null +++ b/src/logging_setup.rs @@ -0,0 +1,10 @@ +// Central place to initialize logging across tests and binary. +use std::sync::Once; + +static INIT: Once = Once::new(); + +pub fn setup() { + INIT.call_once(|| { + env_logger::init(); + }); +}