key=value or key="quoted value". It is the default output format of the Go log/slog package, Heroku’s router, and many other services.
Detection
A file is parsed as logfmt when the first non-empty line contains at least twokey=value pairs and does not start with {.
Example log line
Query examples
msg and lvl are auto-mapped, you can also write:
msg and level fields regardless of which alias your app uses.
Field mapping
The following aliases are normalized automatically:| Canonical field | Recognized aliases |
|---|---|
level | lvl, severity, log_level, loglevel |
message | msg, text, body |
timestamp | ts, time, t, @timestamp, datetime, date |
Limitations
logfmt fields are always flat. There is no nested structure, so dot-notation field access (e.g.,request.headers.host) is not supported. If you need nested fields, use JSON format.