Skip to content

About

Parse and emit logfmt (key=value) log lines — zero dependencies, handles quoting.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

logfmt line parser & formatter

We needed a way to parse and emit key=value log lines without bloating the bundle. This handles the quoting edge cases. The single real gotcha with logfmt is preserving spaces inside quoted values without breaking the tokenizer. This implementation gets that right.

The TypeScript Logfmt Parser relies entirely on the standard library. You install nothing.

logfmt.ts

Look at the test file next to the source code. It demonstrates the exact parsing behavior for those tricky escaped strings.

About

Parse and emit logfmt (key=value) log lines — zero dependencies, handles quoting.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages