1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-18 22:17:44 +02:00

Add log level helper funtions (#1229)

This commit is contained in:
Asim Aslam
2020-02-21 08:43:23 +00:00
committed by GitHub
parent ee977acfef
commit 116855572b
2 changed files with 52 additions and 4 deletions

View File

@ -28,10 +28,6 @@ func Init(opts ...Option) error {
return DefaultLogger.Init(opts...)
}
func Error(err error) Logger {
return DefaultLogger.Error(err)
}
func Fields(fields map[string]interface{}) Logger {
return DefaultLogger.Fields(fields)
}
@ -47,3 +43,7 @@ func Logf(level Level, format string, v ...interface{}) {
func String() string {
return DefaultLogger.String()
}
func WithError(err error) Logger {
return DefaultLogger.Error(err)
}