feat: remove usage of zerolog.Logger.Msgf() from zot code (#1382)

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
Nicol
2023-04-28 05:44:22 +03:00
committed by GitHub
parent 40bf76add5
commit c169698c95
29 changed files with 354 additions and 294 deletions
+4 -3
View File
@@ -297,8 +297,8 @@ func (c *Controller) InitImageStore(ctx context.Context) error {
} else {
storeName := fmt.Sprintf("%v", c.Config.Storage.StorageDriver["name"])
if storeName != storage.S3StorageDriverName {
c.Log.Fatal().Err(errors.ErrBadConfig).Msgf("unsupported storage driver: %s",
c.Config.Storage.StorageDriver["name"])
c.Log.Fatal().Err(errors.ErrBadConfig).Str("storageDriver", storeName).
Msg("unsupported storage driver")
}
// Init a Storager from connection string.
store, err := factory.Create(storeName, c.Config.Storage.StorageDriver)
@@ -405,7 +405,8 @@ func (c *Controller) getSubStore(subPaths map[string]config.StorageConfig,
} else {
storeName := fmt.Sprintf("%v", storageConfig.StorageDriver["name"])
if storeName != storage.S3StorageDriverName {
c.Log.Fatal().Err(errors.ErrBadConfig).Msgf("unsupported storage driver: %s", storageConfig.StorageDriver["name"])
c.Log.Fatal().Err(errors.ErrBadConfig).Str("storageDriver", storeName).
Msg("unsupported storage driver")
}
// Init a Storager from connection string.