1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00
kratos/log/README.md
Tony Chen 21557b38f6
log: add log context (#766)
* add log context & valuer
2021-03-14 15:36:00 +08:00

265 B

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")