solana/src/logger.rs

12 lines
252 B
Rust
Raw Normal View History

2018-04-28 00:31:20 -07:00
use std::sync::{Once, ONCE_INIT};
extern crate env_logger;
static INIT: Once = ONCE_INIT;
/// Setup function that is only run once, even if called multiple times.
pub fn setup() {
INIT.call_once(|| {
let _ = env_logger::init();
});
}