fn parse_logfmt(line: &str) -> Result<BTreeMap<KeyString, Value>, String>Expand description
Parses a logfmt line into key-value pairs.
Follows the grammar used by common logfmt implementations (e.g. go-logfmt):
- pairs are separated by whitespace;
- a key is a run of printable characters other than
=,"and whitespace; - a value is either unquoted (ends at the next whitespace) or double-quoted,
where
\",\\,\n,\r,\t,\/,\b,\fand\uXXXXescapes are supported; key=yields an empty string and a barekeyyieldstrue.