Add logger interface and stop relying on Logrus directly
This commit is contained in:
17
pkg/log/logger.go
Normal file
17
pkg/log/logger.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Package log provides a logger interface for logger libraries
|
||||
// so that dex does not depend on any of them directly.
|
||||
// It also includes a default implementation using Logrus (used by dex previously).
|
||||
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)
|
||||
|
||||
Debugf(format string, args ...interface{})
|
||||
Infof(format string, args ...interface{})
|
||||
Errorf(format string, args ...interface{})
|
||||
}
|
Reference in New Issue
Block a user