-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I know logfmt
is designed to be easy to parse. But there do seem to be some ambiguities about how things are supposed to be emitted and/or parsed (#14, #15, #16), and it's not clear that there is a canonical logfmt
parsing library for Python. Presumably, many people who want to emit logfmt
logs will also want to be able to parse them, whether for colourised display or for more sophisticated processing. I think it would be valuable for this package to also include a parser.
Another benefit of using a parser would be that the package's tests could be expanded to include round-trip testing. This could simply be manual examples, or if one were happy with the development dependency, one could use hypothesis to aggressively explore for problem cases.
Finally, a parser would serve as a concrete, implemented, definition of how logfmt
should represent values. It could be adjusted to match other logfmt
tools that people are likely to be working with, and then this package could be adjusted to ensure that it generated values that were correctly parsed.