zlog: Replace usages of env_logger in tests with zlog (#31436)

Also fixes:
https://github.com/zed-industries/zed/pull/31400#issuecomment-2908165249

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Ben Kunkle 2025-05-26 10:48:50 -05:00 committed by GitHub
parent 0c27aaecb3
commit c0aa8f63fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 123 additions and 167 deletions

View file

@ -37,7 +37,6 @@ buffer_diff = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }
clock = { workspace = true, features = ["test-support"] }
ctor.workspace = true
env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
language_model = { workspace = true, features = ["test-support"] }
@ -48,3 +47,4 @@ rand.workspace = true
settings = { workspace = true, features = ["test-support"] }
text = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
zlog.workspace = true

View file

@ -717,9 +717,7 @@ mod tests {
#[ctor::ctor]
fn init_logger() {
if std::env::var("RUST_LOG").is_ok() {
env_logger::init();
}
zlog::init_test();
}
fn init_test(cx: &mut TestAppContext) {