improved logging thing with the "debug" build tag.

This commit is contained in:
fiatjaf
2023-04-11 09:07:37 -03:00
parent 7b0af23f1a
commit 6f74d284c4
6 changed files with 51 additions and 20 deletions

14
log.go Normal file
View File

@@ -0,0 +1,14 @@
package nostr
import (
"log"
"os"
)
var (
// call SetOutput on InfoLogger to enable info logging
InfoLogger = log.New(os.Stderr, "[go-nostr][info] ", log.LstdFlags)
// call SetOutput on DebugLogger to enable debug logging
DebugLogger = log.New(os.Stderr, "[go-nostr][debug] ", log.LstdFlags)
)