mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-10-09 20:33:27 +02:00
explain how to turn off logs.
This commit is contained in:
10
README.md
10
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
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user