diff --git a/cmd/gateway/azure/gateway-azure.go b/cmd/gateway/azure/gateway-azure.go index d6f8d5f6d..45a21dffc 100644 --- a/cmd/gateway/azure/gateway-azure.go +++ b/cmd/gateway/azure/gateway-azure.go @@ -1131,7 +1131,6 @@ func (a *azureObjects) GetBucketPolicy(ctx context.Context, bucket string) (*pol } if perm.AccessType == storage.ContainerAccessTypePrivate { - logger.LogIf(ctx, minio.BucketPolicyNotFound{Bucket: bucket}) return nil, minio.BucketPolicyNotFound{Bucket: bucket} } else if perm.AccessType != storage.ContainerAccessTypeContainer { logger.LogIf(ctx, minio.NotImplemented{}) diff --git a/cmd/gateway/b2/gateway-b2.go b/cmd/gateway/b2/gateway-b2.go index 9368eec67..f562915e4 100644 --- a/cmd/gateway/b2/gateway-b2.go +++ b/cmd/gateway/b2/gateway-b2.go @@ -772,7 +772,6 @@ func (l *b2Objects) GetBucketPolicy(ctx context.Context, bucket string) (*policy // just return back as policy not found for all cases. // CreateBucket always sets the value to allPrivate by default. if bkt.Type != bucketTypeReadOnly { - logger.LogIf(ctx, minio.BucketPolicyNotFound{Bucket: bucket}) return nil, minio.BucketPolicyNotFound{Bucket: bucket} } diff --git a/cmd/gateway/gcs/gateway-gcs.go b/cmd/gateway/gcs/gateway-gcs.go index ad07b3d85..6e2da0978 100644 --- a/cmd/gateway/gcs/gateway-gcs.go +++ b/cmd/gateway/gcs/gateway-gcs.go @@ -1136,7 +1136,6 @@ func (l *gcsGateway) CompleteMultipartUpload(ctx context.Context, bucket string, func (l *gcsGateway) SetBucketPolicy(ctx context.Context, bucket string, bucketPolicy *policy.Policy) error { policyInfo, err := minio.PolicyToBucketAccessPolicy(bucketPolicy) if err != nil { - // This should not happen. logger.LogIf(ctx, err) return gcsToObjectError(err, bucket) } @@ -1192,7 +1191,6 @@ func (l *gcsGateway) SetBucketPolicy(ctx context.Context, bucket string, bucketP func (l *gcsGateway) GetBucketPolicy(ctx context.Context, bucket string) (*policy.Policy, error) { rules, err := l.client.Bucket(bucket).ACL().List(l.ctx) if err != nil { - logger.LogIf(ctx, err) return nil, gcsToObjectError(err, bucket) } @@ -1227,7 +1225,6 @@ func (l *gcsGateway) GetBucketPolicy(ctx context.Context, bucket string) (*polic // Return NoSuchBucketPolicy error, when policy is not set if len(actionSet) == 0 { - logger.LogIf(ctx, minio.BucketPolicyNotFound{}) return nil, gcsToObjectError(minio.BucketPolicyNotFound{}, bucket) } @@ -1252,7 +1249,6 @@ func (l *gcsGateway) GetBucketPolicy(ctx context.Context, bucket string) (*polic func (l *gcsGateway) DeleteBucketPolicy(ctx context.Context, bucket string) error { // This only removes the storage.AllUsers policies if err := l.client.Bucket(bucket).ACL().Delete(l.ctx, storage.AllUsers); err != nil { - logger.LogIf(ctx, err) return gcsToObjectError(err, bucket) } diff --git a/cmd/gateway/oss/gateway-oss.go b/cmd/gateway/oss/gateway-oss.go index 34c7e4571..2de836503 100644 --- a/cmd/gateway/oss/gateway-oss.go +++ b/cmd/gateway/oss/gateway-oss.go @@ -1018,7 +1018,6 @@ func (l *ossObjects) GetBucketPolicy(ctx context.Context, bucket string) (*polic switch result.ACL { case string(oss.ACLPrivate): // By default, all buckets starts with a "private" policy. - logger.LogIf(ctx, minio.BucketPolicyNotFound{}) return nil, ossToObjectError(minio.BucketPolicyNotFound{}, bucket) case string(oss.ACLPublicRead): readOnly = true diff --git a/cmd/gateway/s3/gateway-s3.go b/cmd/gateway/s3/gateway-s3.go index 02dfba03d..ce18a7735 100644 --- a/cmd/gateway/s3/gateway-s3.go +++ b/cmd/gateway/s3/gateway-s3.go @@ -464,7 +464,6 @@ func (l *s3Objects) SetBucketPolicy(ctx context.Context, bucket string, bucketPo func (l *s3Objects) GetBucketPolicy(ctx context.Context, bucket string) (*policy.Policy, error) { data, err := l.Client.GetBucketPolicy(bucket) if err != nil { - logger.LogIf(ctx, err) return nil, minio.ErrorRespToObjectError(err, bucket) }