From f65a5e756be4638850ed51bd5ccbb290c1da37a2 Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 21 Jun 2021 09:47:41 +0200 Subject: [PATCH 1/2] Add explict syntax for using `pattern` parser Motivation is from community discussion https://community.grafana.com/t/how-to-use-loki-pattern-parser/49195 --- docs/sources/logql/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/logql/_index.md b/docs/sources/logql/_index.md index ea9f724a49e1b..fc0d81eda83b5 100644 --- a/docs/sources/logql/_index.md +++ b/docs/sources/logql/_index.md @@ -280,7 +280,7 @@ will get those labels extracted: ##### Pattern -The pattern parser allows the explicit extraction of fields from log lines by defining a pattern expression. The expression matches the structure of a log line. +The pattern parser allows the explicit extraction of fields from log lines by defining a pattern expression(`| pattern ""`). The expression matches the structure of a log line. Consider this NGINX log line. From b17e8b97971ac33cd74c0309eecd4c8a6732abab Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Mon, 21 Jun 2021 18:35:17 +0200 Subject: [PATCH 2/2] Update docs/sources/logql/_index.md Co-authored-by: Owen Diehl --- docs/sources/logql/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/logql/_index.md b/docs/sources/logql/_index.md index fc0d81eda83b5..1728dcb64b5e4 100644 --- a/docs/sources/logql/_index.md +++ b/docs/sources/logql/_index.md @@ -280,7 +280,7 @@ will get those labels extracted: ##### Pattern -The pattern parser allows the explicit extraction of fields from log lines by defining a pattern expression(`| pattern ""`). The expression matches the structure of a log line. +The pattern parser allows the explicit extraction of fields from log lines by defining a pattern expression (`| pattern ""`). The expression matches the structure of a log line. Consider this NGINX log line.