Lesson 26 of 60
GoLogging with `log` and Structured Logging (`zap`)
15 minutes
Course progress43%
Simple Logging
This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.
The standard library log provides basic logging.
log.Println("Server started")
log.Fatalf("fatal error: %v", err)
Structured logging – zap
$ go get go.uber.org/zap