fix: resolve logger warnings
This commit is contained in:
1 parent
159b21d39a
commit
cb3453f0d0
1 file changed
-2
@@ -61,7 +61,6 @@ impl<S: Subscriber> Layer<S> for StatusLayer {
|
|||||||
fn on_event(&self, event: &tracing::Event<'_>, _ctx: Context<'_, S>) {
|
fn on_event(&self, event: &tracing::Event<'_>, _ctx: Context<'_, S>) {
|
||||||
let level = *event.metadata().level();
|
let level = *event.metadata().level();
|
||||||
|
|
||||||
// Only capture errors and warnings for the status bar
|
|
||||||
if level > Level::WARN {
|
if level > Level::WARN {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -96,7 +95,6 @@ impl Visit for MessageVisitor {
|
|||||||
fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) {
|
fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) {
|
||||||
if field.name() == "message" {
|
if field.name() == "message" {
|
||||||
let formatted = format!("{:?}", value);
|
let formatted = format!("{:?}", value);
|
||||||
// fmt::Arguments Debug wraps in quotes — strip them
|
|
||||||
self.message = formatted
|
self.message = formatted
|
||||||
.strip_prefix('"')
|
.strip_prefix('"')
|
||||||
.and_then(|s| s.strip_suffix('"'))
|
.and_then(|s| s.strip_suffix('"'))
|
||||||
|
|||||||
Reference in new issue
Block a user