1
0
mirror of https://github.com/minio/minio synced 2024-07-05 17:08:43 +00:00

Adding console targets back into systemtarget log slice (#19398)

This commit is contained in:
Sveinn 2024-04-02 17:56:14 -05:00 committed by GitHub
parent 912bbb2f1d
commit ba46ee5dfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -395,8 +395,7 @@ func logIf(ctx context.Context, err error, errKind ...interface{}) {
if err == nil {
return
}
entry := errToEntry(ctx, err, errKind...)
sendLog(ctx, entry)
sendLog(ctx, errToEntry(ctx, err, errKind...))
}
func sendLog(ctx context.Context, entry log.Entry) {
@ -421,8 +420,7 @@ func Event(ctx context.Context, msg string, args ...interface{}) {
if DisableErrorLog {
return
}
entry := logToEntry(ctx, fmt.Sprintf(msg, args...), EventKind)
sendLog(ctx, entry)
sendLog(ctx, logToEntry(ctx, fmt.Sprintf(msg, args...), EventKind))
}
// ErrCritical is the value panic'd whenever CriticalIf is called.

View File

@ -192,8 +192,8 @@ func updateHTTPTargets(ctx context.Context, cfgs map[string]http.Config, targetL
}
}
oldTargets := make([]Target, len(*targetList))
copy(oldTargets, *targetList)
oldTargets, others := splitTargets(*targetList, types.TargetHTTP)
newWebhooks = append(newWebhooks, others...)
for i := range oldTargets {
currentTgt, ok := oldTargets[i].(*http.Target)