mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
logwrapper for jaeger
This commit is contained in:
parent
f37a595f68
commit
f211455643
@ -11,7 +11,6 @@ import (
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
jaeger "github.com/uber/jaeger-client-go"
|
||||
jaegercfg "github.com/uber/jaeger-client-go/config"
|
||||
jaegerlog "github.com/uber/jaeger-client-go/log"
|
||||
ini "gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
@ -67,7 +66,7 @@ func internalInit(settings *TracingSettings) (io.Closer, error) {
|
||||
},
|
||||
}
|
||||
|
||||
jLogger := jaegerlog.StdLogger
|
||||
jLogger := &jaegerLogWrapper{logger: log.New("jaeger")}
|
||||
|
||||
options := []jaegercfg.Option{}
|
||||
options = append(options, jaegercfg.Logger(jLogger))
|
||||
@ -99,3 +98,15 @@ func splitTagSettings(input string) map[string]string {
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
type jaegerLogWrapper struct {
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func (jlw *jaegerLogWrapper) Error(msg string) {
|
||||
jlw.logger.Error(msg)
|
||||
}
|
||||
|
||||
func (jlw *jaegerLogWrapper) Infof(msg string, args ...interface{}) {
|
||||
jlw.logger.Info(msg, args)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user