logger: add FieldLogger() logrus.FieldLogger

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-06-02 23:35:38 +02:00
parent c10ac23ece
commit 9174446b2c
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF

View File

@ -57,6 +57,7 @@ type Logger interface {
Panicln(args ...interface{})
Logr() logr.Logger
FieldLogger() logrus.FieldLogger
}
type logger struct {
@ -200,3 +201,7 @@ func (l *logger) WithError(err error) Logger {
func (l *logger) Logr() logr.Logger {
return logrusr.New(l.fl)
}
func (l *logger) FieldLogger() logrus.FieldLogger {
return l.fl
}