Darktide Mod Manager #39

Merged
lucas merged 91 commits from feat/dtmm into master 2023-03-01 22:27:42 +01:00
Showing only changes of commit 8b2ca0e45a - Show all commits

View file

@ -21,17 +21,30 @@ async fn main() -> Result<()> {
let _matches = command!().get_matches(); let _matches = command!().get_matches();
{ {
let fmt_layer = tracing_subscriber::fmt::layer().pretty();
let filter_layer = let filter_layer =
EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))?; EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))?;
tracing_subscriber::registry() if cfg!(debug_assertions) {
.with(filter_layer) let fmt_layer = tracing_subscriber::fmt::layer().pretty();
.with(fmt_layer)
.with(ErrorLayer::new( tracing_subscriber::registry()
tracing_subscriber::fmt::format::Pretty::default(), .with(filter_layer)
)) .with(fmt_layer)
.init(); .with(ErrorLayer::new(
tracing_subscriber::fmt::format::Pretty::default(),
))
.init();
} else {
let fmt_layer = tracing_subscriber::fmt::layer().compact();
tracing_subscriber::registry()
.with(filter_layer)
.with(fmt_layer)
.with(ErrorLayer::new(
tracing_subscriber::fmt::format::Pretty::default(),
))
.init();
}
} }
let initial_state = State::new(); let initial_state = State::new();