From 72f5d9e6ef894a7e1030524eca2f47c5408dc85a Mon Sep 17 00:00:00 2001 From: Abdulsametileri Date: Thu, 2 Jan 2025 14:28:56 +0300 Subject: [PATCH] chore: add log --- couchbase/healthcheck.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchbase/healthcheck.go b/couchbase/healthcheck.go index 3a06c48..926ec75 100644 --- a/couchbase/healthcheck.go +++ b/couchbase/healthcheck.go @@ -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():