logging: Add subsystem to log API (#19002)

Create new code paths for multiple subsystems in the code. This will
make maintaing this easier later.

Also introduce bugLogIf() for errors that should not happen in the first
place.
This commit is contained in:
Anis Eleuch
2024-04-04 13:04:40 +01:00
committed by GitHub
parent 2228eb61cb
commit 95bf4a57b6
123 changed files with 972 additions and 786 deletions

View File

@@ -20,8 +20,6 @@ package cmd
import (
"context"
"errors"
"github.com/minio/minio/internal/logger"
)
// errMaxVersionsExceeded return error beyond 10000 (default) versions per object
@@ -176,7 +174,7 @@ func osErrToFileErr(err error) error {
return errFaultyDisk
}
if isSysErrInvalidArg(err) {
logger.LogIf(context.Background(), err)
storageLogIf(context.Background(), err)
// For some odd calls with O_DIRECT reads
// filesystems can return EINVAL, handle
// these as FileNotFound instead.