Skip to content

Commit

Permalink
remove incorrect use of grafana-cli logger (grafana#35228)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbrowne authored Jun 4, 2021
1 parent a7606d1 commit 2e9ad87
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/infra/metrics/graphitebridge/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"strings"
"time"

"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
"github.com/prometheus/common/expfmt"
Expand Down Expand Up @@ -203,8 +202,8 @@ func (b *Bridge) Push() error {
return err
}
defer func() {
if err := conn.Close(); err != nil {
logger.Warn("Failed to close connection", "err", err)
if err := conn.Close(); err != nil && b.logger != nil {
b.logger.Println("Failed to close connection", "err", err)
}
}()

Expand Down

0 comments on commit 2e9ad87

Please sign in to comment.