Browse Source

Merge branch 'fix_tracing_spam' into 'master'

fix spam due to mio tracing

See merge request veloren/veloren!1385
tags/v0.8.0
Marcel 4 months ago
parent
commit
00598e6d4b
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      server-cli/src/main.rs

+ 11
- 7
server-cli/src/main.rs View File

@@ -51,12 +51,19 @@ fn main() -> io::Result<()> {
let (mut tui, msg_r) = Tui::new();

// Init logging
let base_exceptions = |env: EnvFilter| {
env.add_directive("veloren_world::sim=info".parse().unwrap())
.add_directive("veloren_world::civ=info".parse().unwrap())
.add_directive("uvth=warn".parse().unwrap())
.add_directive("tiny_http=warn".parse().unwrap())
.add_directive("mio::sys::windows=debug".parse().unwrap())
.add_directive(LevelFilter::INFO.into())
};

#[cfg(not(feature = "tracy"))]
let filter = match std::env::var_os(RUST_LOG_ENV).map(|s| s.into_string()) {
Some(Ok(env)) => {
let mut filter = EnvFilter::new("veloren_world::sim=info")
.add_directive("veloren_world::civ=info".parse().unwrap())
.add_directive(LevelFilter::INFO.into());
let mut filter = base_exceptions(EnvFilter::new(""));
for s in env.split(',').into_iter() {
match s.parse() {
Ok(d) => filter = filter.add_directive(d),
@@ -65,10 +72,7 @@ fn main() -> io::Result<()> {
}
filter
},
_ => EnvFilter::from_env(RUST_LOG_ENV)
.add_directive("veloren_world::sim=info".parse().unwrap())
.add_directive("veloren_world::civ=info".parse().unwrap())
.add_directive(LevelFilter::INFO.into()),
_ => base_exceptions(EnvFilter::from_env(RUST_LOG_ENV)),
};

#[cfg(feature = "tracy")]


Loading…
Cancel
Save