15 lines
339 B
Go
Raw Permalink Normal View History

2024-10-14 13:49:16 +08:00
package test
import "go.uber.org/zap"
func main() {
log := zap.NewExample()
log.Debug("this is debug message")
log.Info("this is info message")
log.Info("this is info message with fileds",
zap.Int("age", 24), zap.String("agender", "man"))
log.Warn("this is warn message")
log.Error("error message")
log.Panic("panic message")
}