diff --git a/api/cache/accessbox.go b/api/cache/accessbox.go index fc11d646d..ef9c27632 100644 --- a/api/cache/accessbox.go +++ b/api/cache/accessbox.go @@ -58,7 +58,7 @@ func (o *AccessBoxCache) Get(address oid.Address) *accessbox.Box { result, ok := entry.(*accessbox.Box) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*accessbox.Box")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } diff --git a/api/cache/buckets.go b/api/cache/buckets.go index 2e16a5539..bb7196000 100644 --- a/api/cache/buckets.go +++ b/api/cache/buckets.go @@ -47,7 +47,7 @@ func (o *BucketCache) Get(key string) *data.BucketInfo { result, ok := entry.(*data.BucketInfo) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*data.BucketInfo")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } diff --git a/api/cache/names.go b/api/cache/names.go index 441fae964..f27226bfc 100644 --- a/api/cache/names.go +++ b/api/cache/names.go @@ -49,7 +49,7 @@ func (o *ObjectsNameCache) Get(key string) *oid.Address { result, ok := entry.(oid.Address) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "oid.Address")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } diff --git a/api/cache/objects.go b/api/cache/objects.go index 4e247d1b0..6628852db 100644 --- a/api/cache/objects.go +++ b/api/cache/objects.go @@ -48,7 +48,7 @@ func (o *ObjectsCache) Get(address oid.Address) *object.Object { result, ok := entry.(object.Object) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "object.Object")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } diff --git a/api/cache/objectslist.go b/api/cache/objectslist.go index d223db22e..e28d47b9a 100644 --- a/api/cache/objectslist.go +++ b/api/cache/objectslist.go @@ -70,7 +70,7 @@ func (l *ObjectsListCache) Get(key ObjectsListKey) []oid.ID { result, ok := entry.([]oid.ID) if !ok { l.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "[]oid.ID")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } @@ -94,7 +94,7 @@ func (l *ObjectsListCache) CleanCacheEntriesContainingObject(objectName string, k, ok := key.(ObjectsListKey) if !ok { l.logger.Warn("invalid cache key type", zap.String("actual", fmt.Sprintf("%T", key)), - zap.String("expected", "ObjectsListKey")) + zap.String("expected", fmt.Sprintf("%T", k))) continue } if cidStr == k.cid && strings.HasPrefix(objectName, k.prefix) { diff --git a/api/cache/system.go b/api/cache/system.go index 708555a64..ce025aa27 100644 --- a/api/cache/system.go +++ b/api/cache/system.go @@ -49,7 +49,7 @@ func (o *SystemCache) GetObject(key string) *data.ObjectInfo { result, ok := entry.(*data.ObjectInfo) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*data.ObjectInfo")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } @@ -65,7 +65,7 @@ func (o *SystemCache) GetCORS(key string) *data.CORSConfiguration { result, ok := entry.(*data.CORSConfiguration) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*data.CORSConfiguration")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } @@ -81,7 +81,7 @@ func (o *SystemCache) GetSettings(key string) *data.BucketSettings { result, ok := entry.(*data.BucketSettings) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*data.BucketSettings")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil } @@ -97,7 +97,7 @@ func (o *SystemCache) GetNotificationConfiguration(key string) *data.Notificatio result, ok := entry.(*data.NotificationConfiguration) if !ok { o.logger.Warn("invalid cache entry type", zap.String("actual", fmt.Sprintf("%T", entry)), - zap.String("expected", "*data.NotificationConfiguration")) + zap.String("expected", fmt.Sprintf("%T", result))) return nil }