Also, use env_logger consistently in the tests for each crate. Only initiallize the logger at all if some RUST_LOG env var is set. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
8 lines
125 B
Rust
8 lines
125 B
Rust
#[cfg(test)]
|
|
#[ctor::ctor]
|
|
fn init_logger() {
|
|
if std::env::var("RUST_LOG").is_ok() {
|
|
env_logger::init();
|
|
}
|
|
}
|