-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
42 lines (37 loc) · 853 Bytes
/
main.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
34
35
36
37
38
39
40
41
42
package main
import (
"context"
"github.com/sado0823/go-kitx/kit/log"
)
func init() {
//kitx.New()
//v := logrus.New()
//v.Level = logrus.DebugLevel
//logger := logrusV.New(v)
//// fields & valuer
//logger = log.WithFields(logger,
// "service.name", "hellworld",
// "service.version", "v1.0.0",
// "ts", log.DefaultTimestamp,
// "caller", log.DefaultCaller,
//)
//
//production, _ := zap.NewProduction(zap.AddCallerSkip(3))
//logger = zapV.New(production)
//
//logger = log.WithFields(logger,
// "service.name", "hellworld",
// "service.version", "v1.0.0",
// "ts", log.DefaultTimestamp,
// "caller", log.DefaultCaller,
//)
//log.SetGlobal(logger)
}
func main() {
log.Debug("debug", 123)
log.Info("info", 456)
log.Warn("warn")
log.Error("error")
log.Fatal("fatal")
log.Context(context.Background()).Error("ccccccc")
}