Open ku1ik opened 2 years ago
This seems to be defined here: https://github.com/grafana/loki/blob/46956d0bf6367aa320de22eb42345b3edb0166ac/pkg/util/log/log.go#L46-L49
I'm not sure how one would fix this. Just changing the code to log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout))
is wrong either, cause everything above "WARN" should be printed to stderr furthermore.
It's similar for promtail, btw.
Im having similar issue. We are using loki with fluentbit. Loki version 2.5.0 and Fluentbit 2.1.0 under kubernetes cluster 1.21
Describe the bug
As in title. This makes alerting configuration based on log severity problematic because everything printed by loki itself seems to be an error. Most logging aggregation tools and platforms treat stderr output as level=error.
For example:
^^^ not an error but it's logged to stderr.
To Reproduce
Steps to reproduce the behavior:
Expected behavior Informational logs are printed to stdout, and only errors are printed to stderr.
Environment: