Don't return errors on logger.Sync

Currently logger.Sync fails often (or always), reading https://github.com/uber-go/zap/issues/328
seems like it's safe to ignore.
This commit is contained in:
Andrea Maria Piana 2019-07-24 08:53:51 +02:00
parent b9a1aa9074
commit 51e8c10cbe
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 3 additions and 1 deletions

View File

@ -248,7 +248,9 @@ func NewMessenger(
shutdownTasks: []func() error{
persistence.Close,
adapter.transport.Reset,
logger.Sync,
// Currently this often fails, seems like it's safe to ignore them
// https://github.com/uber-go/zap/issues/328
func() error { _ = logger.Sync; return nil },
},
logger: logger,
}