reduce unnecessary logging, simplify certain error handling (#18196)

remove a bunch of unnecessary logs
This commit is contained in:
Harshavardhana
2023-10-10 00:33:42 -07:00
committed by GitHub
parent dcce83b288
commit 74e0c9ab9b
9 changed files with 84 additions and 156 deletions

View File

@@ -21,7 +21,6 @@ import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net/http"
"sort"
@@ -31,8 +30,6 @@ import (
"github.com/minio/minio/internal/crypto"
xhttp "github.com/minio/minio/internal/http"
xioutil "github.com/minio/minio/internal/ioutil"
"github.com/minio/minio/internal/logger"
xnet "github.com/minio/pkg/v2/net"
"github.com/minio/pkg/v2/policy"
"github.com/minio/zipindex"
)
@@ -223,9 +220,6 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
return
}
if !xnet.IsNetworkOrHostDown(err, true) { // do not need to log disconnected clients
logger.LogIf(ctx, fmt.Errorf("Unable to write all the data to client: %w", err))
}
return
}
@@ -234,9 +228,6 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
return
}
if !xnet.IsNetworkOrHostDown(err, true) { // do not need to log disconnected clients
logger.LogIf(ctx, fmt.Errorf("Unable to write all the data to client: %w", err))
}
return
}
}