mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-26 13:41:15 +02:00
set default InfoLogger DebugLogger to io.Discard
As applications want select for themselves what gets written to stderr or stdout. Particularly when it gets passed through to parent processes that aren't just writing it to a log file.
This commit is contained in:
6
log.go
6
log.go
@@ -2,13 +2,13 @@ package nostr
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"io"
|
||||
)
|
||||
|
||||
var (
|
||||
// call SetOutput on InfoLogger to enable info logging
|
||||
InfoLogger = log.New(os.Stderr, "[go-nostr][info] ", log.LstdFlags)
|
||||
InfoLogger = log.New(io.Discard, "[go-nostr][info] ", log.LstdFlags)
|
||||
|
||||
// call SetOutput on DebugLogger to enable debug logging
|
||||
DebugLogger = log.New(os.Stderr, "[go-nostr][debug] ", log.LstdFlags)
|
||||
DebugLogger = log.New(io.Discard, "[go-nostr][debug] ", log.LstdFlags)
|
||||
)
|
||||
|
Reference in New Issue
Block a user