v1.8Introduction
Formats (v1)
The three formats of the 1.x branch: nginx, logfmt and syslog, and the limits compared with v2.
Version 1 ships three formats. There is no json-lines and no custom patterns; those arrived in version 2.
| Format | Sample | rec.data |
|---|---|---|
nginx | 10.0.0.7 - - [01/Oct/2026:09:14:07 +0000] "GET / HTTP/1.1" 200 512 | ip, method, path, status, bytes |
logfmt | level=warn msg="slow" ms=812 | all pairs |
syslog | <34>Oct 1 09:14:07 host app: text | host, app |
Limits#
- Time is always UTC, even when no zone is given.
sysloguses the current year.- logfmt values stay strings:
rec.data.msis'812', not812.
A custom format through a function#
If your format is not listed, pass a parsing function:
const parser = sverlo.parser({
format: (line) => {
const m = /^(\S+) (\w+) (.*)$/.exec(line);
return m ? { time: m[1], severity: m[2].toUpperCase(), message: m[3], data: {} } : null;
}
});The function must return a record object or null. A regular expression with nested quantifiers can hang on a long line, which is why v2 replaced regular expressions with patterns.