From 36b6a7774ecac8e3f5ad070e80d2f0119289cd85 Mon Sep 17 00:00:00 2001 From: Oleh Astappiev Date: Sun, 8 Dec 2024 21:27:15 +0100 Subject: [PATCH] chore: reduce amount of logs --- umami.go | 6 ++---- umami_worker.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/umami.go b/umami.go index 227816b..3a92486 100644 --- a/umami.go +++ b/umami.go @@ -135,15 +135,13 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h if !h.isDisabled { err := h.connect(ctx, config) if err != nil { - h.error(err.Error()) - h.error("unable to connect to Umami, the plugin is disabled") + h.error("unable to connect to Umami, the plugin is disabled: " + err.Error()) h.isDisabled = true } err = h.verifyConfig(config) if err != nil { - h.error(err.Error()) - h.error("configuration error, the plugin is disabled") + h.error("configuration error, the plugin is disabled: " + err.Error()) h.isDisabled = true } diff --git a/umami_worker.go b/umami_worker.go index 7360264..964a445 100644 --- a/umami_worker.go +++ b/umami_worker.go @@ -94,7 +94,7 @@ func (h *UmamiFeeder) umamiEventFeeder(ctx context.Context) (err error) { // Wait for event. select { case <-ctx.Done(): - h.error("worker shutting down (canceled)") + h.debug("worker shutting down (canceled)") return nil case event := <-h.queue: