Darktide Mod Manager #39
1 changed files with 21 additions and 8 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue