Docs: Update log level information and add tip (#45411) (#45506)

* Docs: Update conent for log level

* Add tip

(cherry picked from commit 123f095536)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-02-18 11:00:53 +01:00
committed by GitHub
co-authored by Ivana Huckova
parent 129734d1f5
commit 3afbc685fc
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ If the data source does not support loading full range log volume histogram, the
#### Log level
For logs where a level label is specified, we use the value of the label to determine the log level and update color accordingly. If the log doesn't have a level label specified, we try to parse the log using logfmt and JSON parsers to find out if its content matches any of the supported expressions (see below for more information). The log level is always determined by the first match. In case Grafana is not able to determine a log level, it will be visualized with an unknown log level.
For logs where a level label is specified, we use the value of the label to determine the log level and update color accordingly. If the log doesn't have a level label specified, we try to find out if its content matches any of the supported expressions (see below for more information). The log level is always determined by the first match. In case Grafana is not able to determine a log level, it will be visualized with an unknown log level.
> **Tip:** If you use Loki data source and the "level" is in you log content, try to use parsers (JSON, logfmt, regex,..) to extract level information into level label that is used to determine log level.
**Supported log levels and mapping of log level abbreviation and expressions:**