sql: use logging functionality from plugin-sdk (#79294)

This commit is contained in:
Gábor Farkas
2023-12-14 09:42:06 +01:00
committed by GitHub
parent ee82801843
commit 53863c52ca
12 changed files with 35 additions and 30 deletions
+3 -2
View File
@@ -17,7 +17,8 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana-plugin-sdk-go/data/sqlutil"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
corelog "github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/intervalv2"
"github.com/grafana/grafana/pkg/util/errutil"
@@ -231,7 +232,7 @@ func (e *DataSourceHandler) executeQuery(query backend.DataQuery, wg *sync.WaitG
defer func() {
if r := recover(); r != nil {
logger.Error("ExecuteQuery panic", "error", r, "stack", log.Stack(1))
logger.Error("ExecuteQuery panic", "error", r, "stack", corelog.Stack(1))
if theErr, ok := r.(error); ok {
queryResult.dataResponse.Error = theErr
} else if theErrString, ok := r.(string); ok {