From 7efbc74551e7969b1b80a9ae6612af2ed005f7d7 Mon Sep 17 00:00:00 2001 From: Imbris Date: Sun, 6 Sep 2020 15:51:04 -0400 Subject: [PATCH] remove duplicate tracing filter code, fix compiling voxygen with the tracy feature --- .cargo/config | 2 +- common/src/util/mod.rs | 2 +- voxygen/src/logging.rs | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.cargo/config b/.cargo/config index d07f71d5cc..745130059d 100644 --- a/.cargo/config +++ b/.cargo/config @@ -8,6 +8,6 @@ generate = "run --package tools --" test-server = "-Zpackage-features run --bin veloren-server-cli --no-default-features" tracy-server = "-Zunstable-options -Zpackage-features run --bin veloren-server-cli --no-default-features --features tracy --profile no_overflow" test-voxygen = "-Zpackage-features run --bin veloren-voxygen --no-default-features --features gl" -tracy-voxygen = "-Zunstable-options -Zpackage-features run --bin veloren-voxygen --no-default-features --features tracy gl --profile no_overflow" +tracy-voxygen = "-Zunstable-options -Zpackage-features run --bin veloren-voxygen --no-default-features --features tracy,gl --profile no_overflow" server = "run --bin veloren-server-cli" diff --git a/common/src/util/mod.rs b/common/src/util/mod.rs index a3ca02bc19..bd9b18b91a 100644 --- a/common/src/util/mod.rs +++ b/common/src/util/mod.rs @@ -31,7 +31,7 @@ macro_rules! span { let $guard_name = span.enter(); // Directly use `tracy_client` to decrease overhead for better timing #[cfg(feature = "tracy")] - let $guard_name = tracy_client::Span::new( + let $guard_name = $crate::util::tracy_client::Span::new( $name, "", module_path!(), diff --git a/voxygen/src/logging.rs b/voxygen/src/logging.rs index 95bc5678ad..583127e527 100644 --- a/voxygen/src/logging.rs +++ b/voxygen/src/logging.rs @@ -63,11 +63,7 @@ pub fn init(settings: &Settings) -> Vec { }; #[cfg(feature = "tracy")] - let filter = EnvFilter::new("dot_vox::parser=warn") - .add_directive("gfx_device_gl=warn".parse().unwrap()) - .add_directive("uvth=warn".parse().unwrap()) - .add_directive("tiny_http=warn".parse().unwrap()) - .add_directive(LevelFilter::TRACE.into()); + let filter = base_exceptions(EnvFilter::new("")).add_directive(LevelFilter::TRACE.into()); // Create the terminal writer layer. let (non_blocking, _stdio_guard) = tracing_appender::non_blocking(std::io::stdout());