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,10 +21,22 @@ 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"))?;
if cfg!(debug_assertions) {
let fmt_layer = tracing_subscriber::fmt::layer().pretty();
tracing_subscriber::registry()
.with(filter_layer)
.with(fmt_layer)
.with(ErrorLayer::new(
tracing_subscriber::fmt::format::Pretty::default(),
))
.init();
} else {
let fmt_layer = tracing_subscriber::fmt::layer().compact();
tracing_subscriber::registry() tracing_subscriber::registry()
.with(filter_layer) .with(filter_layer)
.with(fmt_layer) .with(fmt_layer)
@ -33,6 +45,7 @@ async fn main() -> Result<()> {
)) ))
.init(); .init();
} }
}
let initial_state = State::new(); let initial_state = State::new();