From c5f6692f744ac5560a56c6e26c14cf0ee4425498 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 1 Mar 2024 15:54:11 -0300 Subject: [PATCH] explain how to turn off logs. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 462fd66..cd8816a 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,16 @@ for _, url := range []string{"wss://nostr.zebedee.cloud", "wss://nostr-pub.wello } ``` +### Logging + +To get more logs from the interaction with relays printed to STDOUT you can compile or run your program with `-tags debug`. + +To remove the info logs completely, replace `nostr.InfoLogger` with something that prints nothing, like + +``` go +nostr.InfoLogger = log.New(io.Discard, "", 0) +``` + ### Example script ```