logger info to debug

This commit is contained in:
MHSanaei 2026-01-03 05:22:50 +01:00
parent d759adbeee
commit 64af90ec7e
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A
2 changed files with 3 additions and 3 deletions

View file

@ -105,7 +105,7 @@ func (w *WebSocketController) HandleWebSocket(c *gin.Context) {
// Register client // Register client
w.hub.Register(client) w.hub.Register(client)
logger.Infof("WebSocket client %s registered from %s", clientID, getRemoteIp(c)) logger.Debugf("WebSocket client %s registered from %s", clientID, getRemoteIp(c))
// Start goroutines for reading and writing // Start goroutines for reading and writing
go w.writePump(client, conn) go w.writePump(client, conn)

View file

@ -128,7 +128,7 @@ func (h *Hub) Run() {
h.clients[client] = true h.clients[client] = true
count := len(h.clients) count := len(h.clients)
h.mu.Unlock() h.mu.Unlock()
logger.Infof("WebSocket client connected: %s (total: %d)", client.ID, count) logger.Debugf("WebSocket client connected: %s (total: %d)", client.ID, count)
case client := <-h.unregister: case client := <-h.unregister:
if client == nil { if client == nil {
@ -153,7 +153,7 @@ func (h *Hub) Run() {
} }
count := len(h.clients) count := len(h.clients)
h.mu.Unlock() h.mu.Unlock()
logger.Infof("WebSocket client disconnected: %s (total: %d)", client.ID, count) logger.Debugf("WebSocket client disconnected: %s (total: %d)", client.ID, count)
case message := <-h.broadcast: case message := <-h.broadcast:
if message == nil { if message == nil {