feat: Implement pretty printing for logging

This commit is contained in:
Lucas Schwiderski 2022-11-05 01:14:19 +01:00
parent 109eb8ffa2
commit 1f44e0bdfc
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -63,14 +63,16 @@ async fn main() -> Result<()> {
.get_matches();
{
let fmt_layer = tracing_subscriber::fmt::layer().with_target(false);
let fmt_layer = tracing_subscriber::fmt::layer().pretty();
let filter_layer =
EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))?;
tracing_subscriber::registry()
.with(filter_layer)
.with(fmt_layer)
.with(ErrorLayer::default())
.with(ErrorLayer::new(
tracing_subscriber::fmt::format::Pretty::default(),
))
.init();
}