grafana/loki

Docs feedback: /docs/sources/logql/log_queries/_index.md

Open

#9,948 创建于 2023年7月14日

在 GitHub 查看
 (1 评论) (0 反应) (1 负责人)Go (28,187 star) (3,997 fork)batch import
help wantedtype/docs

描述

The link to make changes to a the document here: https://grafana.com/docs/loki/latest/logql/log_queries/ is broken and leads to a 404 page in github. I would like to make a suggestion to edit this page based on feedback I have seen from the field.

In this section: https://grafana.com/docs/loki/latest/logql/log_queries/#pattern

By default, a pattern expression is anchored at the start of the log line. If the expression starts with literals, then the log line must also start with the same set of literals. Use <_> at the beginning of the expression if you don’t want to anchor the expression at the start.

add this to the end of that paragraph.

This means that you do not need to capture every part of the line in your pattern. You can create a pattern that only captures the part(s) of the line that you need.

An example that show this would also be good.

贡献者指南