From 95bb043dcb963b01382067f6ec79dfbbe2257915 Mon Sep 17 00:00:00 2001 From: dd dd Date: Fri, 2 Aug 2024 10:32:28 +0200 Subject: [PATCH] Change log level from Info to Debug for read/write operations Updated logging statements for reading and writing operations in conn.go from Info to Debug level. This will reduce noise in the logs and help focus on more crucial log messages during standard operation while preserving these details for debugging purposes. --- netstr/conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netstr/conn.go b/netstr/conn.go index 9088929..5bc40b4 100644 --- a/netstr/conn.go +++ b/netstr/conn.go @@ -137,7 +137,7 @@ func (nc *NostrConnection) handleNostrRead(b []byte, n int) (int, error) { if err != nil { return 0, err } - slog.Info("reading", slog.String("event", event.ID), slog.String("content", base64.StdEncoding.EncodeToString(message.Data))) + slog.Debug("reading", slog.String("event", event.ID), slog.String("content", base64.StdEncoding.EncodeToString(message.Data))) n = copy(b, message.Data) return n, nil case <-nc.ctx.Done(): @@ -221,7 +221,7 @@ func (nc *NostrConnection) handleNostrWrite(b []byte) (int, error) { } } nc.sentBytes = append(nc.sentBytes, b) - slog.Info("writing", slog.String("event", ev.ID), slog.String("content", base64.StdEncoding.EncodeToString(b))) + slog.Debug("writing", slog.String("event", ev.ID), slog.String("content", base64.StdEncoding.EncodeToString(b))) return len(b), nil }