From d8e07b20c658a0934e9c801ccb6c32c4ea1169b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 25 Nov 2024 19:43:39 +0100 Subject: [PATCH] fix: log messages for subscribers --- subscribe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscribe.go b/subscribe.go index 86499b61..a8f45b7a 100644 --- a/subscribe.go +++ b/subscribe.go @@ -170,7 +170,7 @@ func (h *Hub) registerSubscriber(w http.ResponseWriter, r *http.Request) (*Local } if err != nil || (claims == nil && !h.anonymous) { http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) - if c := h.logger.Check(zap.DebugLevel, "LocalSubscriber unauthorized"); c != nil { + if c := h.logger.Check(zap.DebugLevel, "Subscriber unauthorized"); c != nil { c.Write(zap.Object("subscriber", s), zap.Error(err)) } @@ -297,7 +297,7 @@ func (h *Hub) shutdown(s *LocalSubscriber) { } h.dispatchSubscriptionUpdate(s, false) - if c := h.logger.Check(zap.InfoLevel, "LocalSubscriber disconnected"); c != nil { + if c := h.logger.Check(zap.InfoLevel, "Subscriber disconnected"); c != nil { c.Write(zap.Object("subscriber", s)) } h.metrics.SubscriberDisconnected(s)