Remove structured logging from the logger interface
This commit is contained in:
parent
be581fa7ff
commit
d1c8f8d095
3 changed files with 1 additions and 8 deletions
|
@ -6,8 +6,6 @@ package log
|
||||||
// Logger serves as an adapter interface for logger libraries
|
// Logger serves as an adapter interface for logger libraries
|
||||||
// so that dex does not depend on any of them directly.
|
// so that dex does not depend on any of them directly.
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
WithField(key string, value interface{}) Logger
|
|
||||||
|
|
||||||
Info(msg string)
|
Info(msg string)
|
||||||
Warn(msg string)
|
Warn(msg string)
|
||||||
|
|
||||||
|
|
|
@ -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.
|
// Info logs an Info level event.
|
||||||
func (l *LogrusLogger) Info(msg string) {
|
func (l *LogrusLogger) Info(msg string) {
|
||||||
l.logger.Info(msg)
|
l.logger.Info(msg)
|
||||||
|
|
|
@ -485,7 +485,7 @@ func (s *Server) OpenConnector(conn storage.Connector) (Connector, error) {
|
||||||
c = newPasswordDB(s.storage)
|
c = newPasswordDB(s.storage)
|
||||||
} else {
|
} else {
|
||||||
var err error
|
var err error
|
||||||
c, err = openConnector(s.logger.WithField("connector", conn.Name), conn)
|
c, err = openConnector(s.logger, conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Connector{}, fmt.Errorf("failed to open connector: %v", err)
|
return Connector{}, fmt.Errorf("failed to open connector: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue