Azure Monitor: use NewLoggerWith func instead of backend.Logger (#81124)

using NewLoggerWith
This commit is contained in:
Andrew Hackmann
2024-01-26 22:53:55 +00:00
committed by GitHub
parent 0530021396
commit b411aa7266
8 changed files with 49 additions and 28 deletions
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/grafana/grafana-azure-sdk-go/azsettings"
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
"github.com/grafana/grafana/pkg/tsdb/azuremonitor/metrics"
"github.com/grafana/grafana/pkg/tsdb/azuremonitor/types"
@@ -106,6 +107,7 @@ func Test_handleResourceReq(t *testing.T) {
azureMonitor: {
URL: routes[azsettings.AzurePublic][azureMonitor].URL,
HTTPClient: &http.Client{},
Logger: log.DefaultLogger,
},
},
},
@@ -114,6 +116,7 @@ func Test_handleResourceReq(t *testing.T) {
Proxy: proxy,
},
},
logger: log.DefaultLogger,
}
rw := httptest.NewRecorder()
req, err := http.NewRequest(http.MethodGet, "http://foo/azuremonitor/subscriptions/44693801", nil)