a pluggable logging interface and more debug logging.

This commit is contained in:
fiatjaf
2023-04-11 00:28:52 -03:00
parent f918809e21
commit e103c99bb8
3 changed files with 22 additions and 5 deletions

14
lib.go Normal file
View File

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