Log target before prefix for more consistent logging (#7897)

* Log target before prefix for more consistent logging

As requested, this moves the target before the prefix to have consistent
logging between logs with and without a prefix.

* Add a space
This commit is contained in:
Bastian Köcher
2021-01-14 17:04:41 +01:00
committed by GitHub
parent c49ed20aec
commit 1560c8a704
+4 -3
View File
@@ -125,6 +125,10 @@ where
}
}
if self.display_target {
write!(writer, "{}: ", meta.target())?;
}
// Custom code to display node name
if let Some(span) = ctx.lookup_current() {
let parents = span.parents();
@@ -137,9 +141,6 @@ where
}
}
if self.display_target {
write!(writer, "{}:", meta.target())?;
}
ctx.format_fields(writer, event)?;
writeln!(writer)?;