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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user