From c44b22419d4973bc649e6c8fead9cd25daac84df Mon Sep 17 00:00:00 2001 From: Niklas Date: Sat, 10 Oct 2020 00:35:38 +0200 Subject: [PATCH] improved logging --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9fa925f..0b15fd4 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,6 @@ func listenToPushEvents(url string, c chan messageType) { return } - log.Printf("Message: %s %s\n", result.Title, result.Message) c <- result } } @@ -175,6 +174,7 @@ func parseArgs() (string, string) { func main() { hostname, token := parseArgs() + log.Printf("Starting on: %s", hostname) u := url.URL{Scheme: "wss", Host: hostname, Path: "/stream"} @@ -192,6 +192,7 @@ func main() { go listenToPushEvents(u.String()+"?"+param.Encode(), push) for pushMessage := range push { + log.Printf("Message: %s | %s\n", pushMessage.Title, pushMessage.Message) go sendNotification(dbusConn, pushMessage, hostname, token) } }