From 8b8228c0f9a4f959808c9c05e7bc40085a2b1db5 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Mon, 9 Apr 2018 15:21:25 +0200 Subject: [PATCH] Fix logging in unsplash --- mods/unsplash.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/unsplash.go b/mods/unsplash.go index fbe007d..6fa7164 100644 --- a/mods/unsplash.go +++ b/mods/unsplash.go @@ -85,7 +85,7 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) { resp, err := http.Get(unsplashUrl) if err != nil { - log.Println("[unsplash] HTTP request failed: %s\n", err.Error()) + log.Printf("[unsplash] HTTP request failed: %s\nOriginal URL: %s\n", err.Error(), unsplashUrl) broker.SendTextMessage(update.Chat, "ERRORE! @hamcha controlla la console!", &update.MessageID) return } @@ -93,7 +93,7 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) { img, _, err := image.Decode(resp.Body) if err != nil { - log.Println("[unsplash] Image decode error: %s\n", err.Error()) + log.Printf("[unsplash] Image decode error: %s\nOriginal URL: %s\n", err.Error(), unsplashUrl) broker.SendTextMessage(update.Chat, "ERRORE: Non riesco a leggere l'immagine", &update.MessageID) return }