From 62d97964e381bdafb3addde57c5d4d7f67ed0b32 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Thu, 2 Apr 2020 21:23:19 +0200 Subject: [PATCH] fix(FmtSubscriber): add space between multiple values for same key in a span #627 Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- tracing-subscriber/src/fmt/fmt_layer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tracing-subscriber/src/fmt/fmt_layer.rs b/tracing-subscriber/src/fmt/fmt_layer.rs index ea3ca92982..c206e2b2c0 100644 --- a/tracing-subscriber/src/fmt/fmt_layer.rs +++ b/tracing-subscriber/src/fmt/fmt_layer.rs @@ -459,6 +459,9 @@ where if let Some(FormattedFields { ref mut fields, .. }) = extensions.get_mut::>() { + if !values.is_empty() { + fields.push(' '); + } let _ = self.fmt_fields.format_fields(fields, values); } else { let mut buf = String::new();