You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/parsers/logfmt.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,29 @@
2
2
3
3
The **logfmt** parser allows to parse the logfmt format described in [https://brandur.org/logfmt](https://brandur.org/logfmt) . A more formal description is in [https://godoc.org/github.com/kr/logfmt](https://godoc.org/github.com/kr/logfmt) .
4
4
5
-
Here is an example configuration:
5
+
Here is an example parsers configuration:
6
6
7
-
```python
7
+
{% tabs %}
8
+
{% tab title="parsers.yaml" %}
9
+
10
+
```yaml
11
+
parsers:
12
+
- name: logfmt
13
+
format: logfmt
14
+
```
15
+
16
+
{% endtab %}
17
+
{% tab title="parsers.conf" %}
18
+
19
+
```text
8
20
[PARSER]
9
21
Name logfmt
10
22
Format logfmt
11
23
```
12
24
25
+
{% endtab %}
26
+
{% endtabs %}
27
+
13
28
The following log entry is a valid content for the parser defined above:
14
29
15
30
```text
@@ -27,9 +42,25 @@ After processing, it internal representation will be:
27
42
If you want to be more strict than the logfmt standard and not parse lines where some attributes do
28
43
not have values (such as `key3`) in the example above, you can configure the parser as follows:
0 commit comments