Skip to content

Commit 7bc2b5b

Browse files
Fishrock123lrlna
andauthored
fix: corrected ndjson key-value formatting (#25)
rust-lang/log#400 was merged upstream and caused this crate's json key-value logging to break. This is problem for Tide, which uses key-value logging in it's default log middleware. Fixes: #17 Refs: http-rs/tide#752 Co-authored-by: Irina Shestak <[email protected]>
1 parent e8593e7 commit 7bc2b5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ndjson.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn format_kv_pairs<'b>(mut out: &mut StdoutLock<'b>, record: &Record) {
5656
key: kv::Key<'kvs>,
5757
val: kv::Value<'kvs>,
5858
) -> Result<(), kv::Error> {
59-
write!(self.string, ",\"{}\":{}", key, val)?;
59+
write!(self.string, ",\"{}\":\"{}\"", key, val)?;
6060
Ok(())
6161
}
6262
}

0 commit comments

Comments
 (0)