Skip to content

Commit f350e00

Browse files
authored
reverseproxy: Only log host is up status on change (fixes #6415) (#6419)
1 parent 0287009 commit f350e00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/caddyhttp/reverseproxy/healthchecks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, upstre
426426
}
427427
if upstream.Host.activeHealthPasses() >= h.HealthChecks.Active.Passes {
428428
if upstream.setHealthy(true) {
429+
h.HealthChecks.Active.logger.Info("host is up", zap.String("host", hostAddr))
429430
h.events.Emit(h.ctx, "healthy", map[string]any{"host": hostAddr})
430431
upstream.Host.resetHealth()
431432
}
@@ -492,7 +493,6 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, upstre
492493
}
493494

494495
// passed health check parameters, so mark as healthy
495-
h.HealthChecks.Active.logger.Info("host is up", zap.String("host", hostAddr))
496496
markHealthy()
497497

498498
return nil

0 commit comments

Comments
 (0)