mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: console logger regression with dynamic logger webhook registration (#14346)
fixes a regression from #14289
This commit is contained in:
@@ -139,6 +139,14 @@ func UpdateTargets(cfg Config) error {
|
||||
}
|
||||
|
||||
swapMu.Lock()
|
||||
for _, tgt := range targets {
|
||||
// Preserve console target when dynamically updating
|
||||
// other HTTP targets, console target is always present.
|
||||
if tgt.String() == ConsoleLoggerTgt {
|
||||
updated = append(updated, tgt)
|
||||
break
|
||||
}
|
||||
}
|
||||
atomic.StoreInt32(&nTargets, int32(len(updated)))
|
||||
cancelAllTargets() // cancel running targets
|
||||
targets = updated
|
||||
|
||||
Reference in New Issue
Block a user