make default layers display filter level
@@ -183,12 +183,15 @@ impl LogSettings {
guards.push(guard);
match settings.format {
LogFormat::Default | LogFormat::Plain => {
- let layer = tracing_subscriber::fmt::Layer::new().with_writer(non_blocking);
+ let layer = tracing_subscriber::fmt::Layer::new()
+ .with_level(true)
+ .with_writer(non_blocking);
(Some(layer), None)
}
LogFormat::Json => {
let layer = tracing_subscriber::fmt::Layer::new()
.json()
+ .with_level(true)
.with_writer(non_blocking);
(None, Some(layer))
}
@@ -201,12 +204,15 @@ impl LogSettings {
guards.push(guard);
match settings.format {
LogFormat::Default | LogFormat::Plain => {
- let layer = tracing_subscriber::fmt::Layer::new().with_writer(non_blocking);
+ let layer = tracing_subscriber::fmt::Layer::new()
+ .with_level(true)
+ .with_writer(non_blocking);
(Some(layer), None)
}
LogFormat::Json => {
let layer = tracing_subscriber::fmt::Layer::new()
.json()
+ .with_level(true)
.with_writer(non_blocking);
(None, Some(layer))
}
@@ -231,12 +237,15 @@ impl LogSettings {
match settings.format {
LogFormat::Default | LogFormat::Plain => {
- let layer = tracing_subscriber::fmt::Layer::new().with_writer(non_blocking);
+ let layer = tracing_subscriber::fmt::Layer::new()
+ .with_level(true)
+ .with_writer(non_blocking);
(Some(layer), None)
}
LogFormat::Json => {
let layer = tracing_subscriber::fmt::Layer::new()
.json()
+ .with_level(true)
.with_writer(non_blocking);
(None, Some(layer))
}
