mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user