mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -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:
@@ -38,6 +38,10 @@ import (
|
||||
xnet "github.com/minio/pkg/v2/net"
|
||||
)
|
||||
|
||||
func authNLogIf(ctx context.Context, err error) {
|
||||
logger.LogIf(ctx, "authN", err)
|
||||
}
|
||||
|
||||
// Authentication Plugin config and env variables
|
||||
const (
|
||||
URL = "url"
|
||||
@@ -434,7 +438,7 @@ func (o *AuthNPlugin) checkConnectivity(ctx context.Context) bool {
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodHead, u.String(), nil)
|
||||
if err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
authNLogIf(ctx, err)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user