Chore: Swap out use of backend plugin SDK's backend.Logger (#33783)

* Remove use of backend SDKs backend.Logger

* reorder imports

* FIx logger name

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
pull/33753/head^2
Will Browne 4 years ago committed by GitHub
parent e407a092fb
commit 9726c76429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      pkg/expr/nodes.go

@ -10,10 +10,15 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/expr/classic"
"github.com/grafana/grafana/pkg/expr/mathexp"
"github.com/grafana/grafana/pkg/infra/log"
"gonum.org/v1/gonum/graph/simple"
)
var (
logger = log.New("expr")
)
// baseNode includes commmon properties used across DPNodes.
type baseNode struct {
id int64
@ -241,7 +246,7 @@ func (dn *DSNode) Execute(ctx context.Context, vars mathexp.Vars, s *Service) (m
if len(qr.Frames) == 1 {
frame := qr.Frames[0]
if frame.TimeSeriesSchema().Type == data.TimeSeriesTypeNot && isNumberTable(frame) {
backend.Logger.Debug("expression datasource query (numberSet)", "query", refID)
logger.Debug("expression datasource query (numberSet)", "query", refID)
numberSet, err := extractNumberSet(frame)
if err != nil {
return mathexp.Results{}, err
@ -257,7 +262,7 @@ func (dn *DSNode) Execute(ctx context.Context, vars mathexp.Vars, s *Service) (m
}
for _, frame := range qr.Frames {
backend.Logger.Debug("expression datasource query (seriesSet)", "query", refID)
logger.Debug("expression datasource query (seriesSet)", "query", refID)
series, err := WideToMany(frame)
if err != nil {
return mathexp.Results{}, err

Loading…
Cancel
Save