Logger migration from log15 to gokit/log (#41636)

* migrate log15 to gokit/log

* fix console log

* update some unittest

* fix all unittest

* fix the build

* Update pkg/infra/log/log.go

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>

* general type vector

* correct the level key

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
This commit is contained in:
ying-jeanne
2022-01-06 15:28:05 +01:00
committed by GitHub
parent 8898a5f0a0
commit a8eef45a44
17 changed files with 628 additions and 321 deletions

View File

@ -5,7 +5,6 @@ import (
"path/filepath"
"testing"
"github.com/inconshreveable/log15"
"github.com/stretchr/testify/assert"
"github.com/grafana/grafana/pkg/infra/log"
@ -357,11 +356,11 @@ type testPlugin struct {
}
type fakeLogger struct {
log.Logger
log.MultiLoggers
}
func (f fakeLogger) New(_ ...interface{}) log15.Logger {
return fakeLogger{}
func (f fakeLogger) New(_ ...interface{}) log.MultiLoggers {
return log.MultiLoggers{}
}
func (f fakeLogger) Warn(_ string, _ ...interface{}) {