1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-07 23:02:12 +02:00
kratos/log
2021-03-16 22:52:00 +08:00
..
helper_test.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
helper.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
level.go fix json tag (#769) 2021-03-15 17:06:06 +08:00
log_test.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
log.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
README.md log: add log context (#766) 2021-03-14 15:36:00 +08:00
std_test.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
std.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
value_test.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
value.go log: add log context (#766) 2021-03-14 15:36:00 +08:00
verbose_test.go add log verbose (#772) 2021-03-16 22:52:00 +08:00
verbose.go add log verbose (#772) 2021-03-16 22:52:00 +08:00

Log

Usage

Structured logging

logger := log.NewLogger(os.Stdout)
logger = With(logger, "key", "value")

log := log.NewHelper("github.com/project/foo", logger)
// Levels
log.Info("hello")
log.Infof("hello %s", "kratos")
log.Infow("key", "value")