diff --git a/pkg/log/logger.go b/pkg/log/logger.go index 60a651b4..bf276f48 100644 --- a/pkg/log/logger.go +++ b/pkg/log/logger.go @@ -6,8 +6,6 @@ package log // Logger serves as an adapter interface for logger libraries // so that dex does not depend on any of them directly. type Logger interface { - WithField(key string, value interface{}) Logger - Info(msg string) Warn(msg string) diff --git a/pkg/log/logrus.go b/pkg/log/logrus.go index 4efd6482..c7acd6b2 100644 --- a/pkg/log/logrus.go +++ b/pkg/log/logrus.go @@ -14,11 +14,6 @@ func NewLogrusLogger(logger logrus.FieldLogger) *LogrusLogger { } } -// WithField adds a field to the log entry. -func (l *LogrusLogger) WithField(key string, value interface{}) Logger { - return NewLogrusLogger(l.logger.WithField(key, value)) -} - // Info logs an Info level event. func (l *LogrusLogger) Info(msg string) { l.logger.Info(msg) diff --git a/server/server.go b/server/server.go index 49d6fc2e..c338584e 100644 --- a/server/server.go +++ b/server/server.go @@ -485,7 +485,7 @@ func (s *Server) OpenConnector(conn storage.Connector) (Connector, error) { c = newPasswordDB(s.storage) } else { var err error - c, err = openConnector(s.logger.WithField("connector", conn.Name), conn) + c, err = openConnector(s.logger, conn) if err != nil { return Connector{}, fmt.Errorf("failed to open connector: %v", err) }