2018-11-14 09:18:03 +00:00
|
|
|
package jaeger
|
|
|
|
|
|
|
|
import (
|
2019-08-03 01:58:23 +00:00
|
|
|
"github.com/containous/traefik/v2/pkg/log"
|
2018-11-14 09:18:03 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
2020-05-11 10:06:07 +00:00
|
|
|
// jaegerLogger is an implementation of the Logger interface that delegates to traefik log.
|
2018-11-14 09:18:03 +00:00
|
|
|
type jaegerLogger struct {
|
|
|
|
logger logrus.FieldLogger
|
|
|
|
}
|
|
|
|
|
|
|
|
func newJaegerLogger() *jaegerLogger {
|
|
|
|
return &jaegerLogger{
|
|
|
|
logger: log.WithoutContext().WithField(log.TracingProviderName, "jaeger"),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (l *jaegerLogger) Error(msg string) {
|
|
|
|
l.logger.Errorf("Tracing jaeger error: %s", msg)
|
|
|
|
}
|
|
|
|
|
2020-05-11 10:06:07 +00:00
|
|
|
// Infof logs a message at debug priority.
|
2018-11-14 09:18:03 +00:00
|
|
|
func (l *jaegerLogger) Infof(msg string, args ...interface{}) {
|
|
|
|
l.logger.Debugf(msg, args...)
|
|
|
|
}
|