mirror of
https://github.com/linka-cloud/grpc.git
synced 2024-11-22 02:46:25 +00:00
logger: add FieldLogger() logrus.FieldLogger
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
c10ac23ece
commit
9174446b2c
@ -57,6 +57,7 @@ type Logger interface {
|
|||||||
Panicln(args ...interface{})
|
Panicln(args ...interface{})
|
||||||
|
|
||||||
Logr() logr.Logger
|
Logr() logr.Logger
|
||||||
|
FieldLogger() logrus.FieldLogger
|
||||||
}
|
}
|
||||||
|
|
||||||
type logger struct {
|
type logger struct {
|
||||||
@ -200,3 +201,7 @@ func (l *logger) WithError(err error) Logger {
|
|||||||
func (l *logger) Logr() logr.Logger {
|
func (l *logger) Logr() logr.Logger {
|
||||||
return logrusr.New(l.fl)
|
return logrusr.New(l.fl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (l *logger) FieldLogger() logrus.FieldLogger {
|
||||||
|
return l.fl
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user