-
Notifications
You must be signed in to change notification settings - Fork 0
/
logger.go
33 lines (29 loc) · 1.05 KB
/
logger.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package logger
import (
"github.com/tuanp/go-mircroservice-boilerplate/pkg/config"
"time"
)
type Fields map[string]interface{}
type Logger interface {
Configure(cfg func(internalLog interface{}))
Debug(args ...interface{})
Debugf(template string, args ...interface{})
Debugw(msg string, fields Fields)
LogType() config.LogType
Info(args ...interface{})
Infof(template string, args ...interface{})
Infow(msg string, fields Fields)
Warn(args ...interface{})
Warnf(template string, args ...interface{})
WarnMsg(msg string, err error)
Error(args ...interface{})
Errorw(msg string, fields Fields)
Errorf(template string, args ...interface{})
Err(msg string, err error)
Fatal(args ...interface{})
Fatalf(template string, args ...interface{})
Printf(template string, args ...interface{})
WithName(name string)
GrpcMiddlewareAccessLogger(method string, time time.Duration, metaData map[string][]string, err error)
GrpcClientInterceptorLogger(method string, req interface{}, reply interface{}, time time.Duration, metaData map[string][]string, err error)
}