From 1452bf50af15300af6bb0aa5370826f5fc87f55d Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Mon, 4 Sep 2017 16:05:45 +0100 Subject: [PATCH] Actually filter logs based on level. --- promlog/log.go | 1 + 1 file changed, 1 insertion(+) diff --git a/promlog/log.go b/promlog/log.go index d22a9eea6..cf8307ad2 100644 --- a/promlog/log.go +++ b/promlog/log.go @@ -57,6 +57,7 @@ func (l *AllowedLevel) Set(s string) error { // with a timestamp. The output always goes to stderr. func New(al AllowedLevel) log.Logger { l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)) + l = level.NewFilter(l, al.o) l = log.With(l, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller) return l }