traefik/pkg/tracing/jaeger/logger.go
Jean-Baptiste Doumenjou c0f1e74bed
chore: move to Traefik organization.
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
2020-09-16 15:46:04 +02:00

26 lines
629 B
Go

package jaeger
import (
"github.com/sirupsen/logrus"
"github.com/traefik/traefik/v2/pkg/log"
)
// jaegerLogger is an implementation of the Logger interface that delegates to traefik log.
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)
}
// Infof logs a message at debug priority.
func (l *jaegerLogger) Infof(msg string, args ...interface{}) {
l.logger.Debugf(msg, args...)
}