Skip to content

Commit

Permalink
subscriber: add space when recording new values on an existing span
Browse files Browse the repository at this point in the history
## Motivation 

Fix the issue #627 

## Solution 

If the remaining values is not empty I just append a whitespace to
format.

BTW than you all for your work and tag `Good first issue` ❤️ you build 
a real opensource project with a real community.

Fixes #627 

Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj authored Apr 2, 2020
1 parent 887f791 commit ee675a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tracing-subscriber/src/fmt/fmt_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ where
if let Some(FormattedFields { ref mut fields, .. }) =
extensions.get_mut::<FormattedFields<N>>()
{
if !values.is_empty() {
fields.push(' ');
}
let _ = self.fmt_fields.format_fields(fields, values);
} else {
let mut buf = String::new();
Expand Down

0 comments on commit ee675a2

Please sign in to comment.