Logfmt
The logfmt parser lets you parse data in the logfmt format.
Here is an example parsers configuration:
parsers:
- name: logfmt
format: logfmt[PARSER]
Name logfmt
Format logfmtThe following log entry is valid for the previously defined parser:
key1=val1 key2=val2 key3After processing, its internal representation will be:
[1540936693, {"key1"=>"val1",
"key2"=>"val2"
"key3"=>true}]If you want to be more strict than the logfmt standard and not parse lines where certain keys lack values (such as key3 in the previous example), you can configure the parser as follows:
parsers:
- name: logfmt
format: logfmt
logfmt_no_bare_keys: true[PARSER]
Name logfmt
Format logfmt
Logfmt_No_Bare_Keys trueLast updated
Was this helpful?