cc
This commit is contained in:
parent
54ce83f458
commit
5ca21e635d
|
|
@ -28,7 +28,12 @@ func loggerInit() *zap.SugaredLogger {
|
|||
if err != nil {
|
||||
panic(fmt.Sprintf("Logger set up failed: %v", err))
|
||||
}
|
||||
defer logger.Sync()
|
||||
defer func() {
|
||||
err := logger.Sync()
|
||||
if err != nil {
|
||||
logger.Error("couldn't sinc logger")
|
||||
}
|
||||
}()
|
||||
return logger.Sugar()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ func PoolFactory(cephConn mytypes.CephConnector, poolName string) (mytypes.Pool,
|
|||
|
||||
ioctx, err := cephConn.OpenIOContext(poolName)
|
||||
if err != nil {
|
||||
return mytypes.Pool{}, fmt.Errorf("Couldn't set context for pool %s %w", poolName, err)
|
||||
return mytypes.Pool{}, fmt.Errorf("couldn't set context for pool %s %w", poolName, err)
|
||||
}
|
||||
|
||||
defer ioctx.Destroy()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user