You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/log
Tony Chen 74272546ca
fix json tag (#769)
4 years ago
..
README.md log: add log context (#766) 4 years ago
helper.go log: add log context (#766) 4 years ago
helper_test.go log: add log context (#766) 4 years ago
level.go fix json tag (#769) 4 years ago
log.go log: add log context (#766) 4 years ago
log_test.go log: add log context (#766) 4 years ago
std.go log: add log context (#766) 4 years ago
std_test.go log: add log context (#766) 4 years ago
value.go log: add log context (#766) 4 years ago
value_test.go log: add log context (#766) 4 years ago

README.md

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