Hacker News new | ask | show | jobs
by spearo77 2517 days ago
I searched for logfmt and found your website – https://brandur.org/logfmt

What I can't find described for logfmt is how to handle escaping special characters in the keys or values. Specifically the quotes and equals.

JSON defines this very well, but Splunk simple key=value logging formats suffer from escaping and parsing problems.

1 comments

You could use yaml serialiser, which leaves non special strings as is and quotes special ones. But this approach can break naive grepping.