Logging in subscribe and publish command

This commit is contained in:
Philipp Heckel 2022-06-02 11:59:22 -04:00
parent 5cc0b194d3
commit e12995e218
10 changed files with 67 additions and 48 deletions

View file

@ -10,6 +10,7 @@ import (
"google.golang.org/api/option"
"heckel.io/ntfy/auth"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"strings"
)
@ -45,7 +46,7 @@ func (c *firebaseClient) Send(v *visitor, m *message) error {
return err
}
if log.IsTrace() {
log.Trace("%s Firebase message: %s", logMessagePrefix(v, m), maybeMarshalJSON(fbm))
log.Trace("%s Firebase message: %s", logMessagePrefix(v, m), util.MaybeMarshalJSON(fbm))
}
err = c.sender.Send(fbm)
if err == errFirebaseQuotaExceeded {