uber-go / zap

Blazing fast, structured, leveled logging in Go.
https://pkg.go.dev/go.uber.org/zap
MIT License
22.08k stars 1.44k forks source link

add error handling for `logger.Sync()` #1421

Open whiteforestever opened 8 months ago

whiteforestever commented 8 months ago

By using current approach defer logger.Sync() we don't handle possible error returned by func (log *Logger) Sync() error. My suggestion is to wrap it with anonymous function.

CLAassistant commented 8 months ago

CLA assistant check
All committers have signed the CLA.