Skip to content

Commit

Permalink
chore: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdulsametileri committed Jan 2, 2025
1 parent 695e66e commit 72f5d9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion couchbase/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ func (h *healthCheck) performHealthCheck(ctx context.Context) {
for attempt := 1; attempt <= maxRetries; attempt++ {
_, err := h.client.Ping()
if err == nil {
logger.Log.Trace("healthcheck success")
logger.Log.Trace("Health check success")
return
}

logger.Log.Warn("Health check attempt %d/%d failed: %v", attempt, maxRetries, err)

if attempt < maxRetries {
select {
case <-ctx.Done():
Expand Down

0 comments on commit 72f5d9e

Please sign in to comment.