From b464acd1f117fa1310c8551f572ce986a575cf94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 29 May 2013 07:15:00 +0200 Subject: [PATCH] Slightly improve logging. --- .../java/net/pterodactylus/sonitus/data/source/StreamSource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java b/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java index a55654f..dc6e4d0 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java +++ b/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java @@ -25,6 +25,7 @@ import java.net.URLConnection; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.logging.Logger; import net.pterodactylus.sonitus.data.AbstractControlledComponent; import net.pterodactylus.sonitus.data.ContentMetadata; @@ -48,6 +49,9 @@ import com.google.common.primitives.Ints; */ public class StreamSource extends AbstractControlledComponent implements Source { + /** The logger. */ + private static final Logger logger = Logger.getLogger(StreamSource.class.getName()); + /** The URL of the stream. */ private final String streamUrl; @@ -83,6 +87,7 @@ public class StreamSource extends AbstractControlledComponent implements Source httpUrlConnection.setRequestProperty("ICY-Metadata", "1"); /* connect. */ + logger.info(String.format("Connecting to %s...", streamUrl)); httpUrlConnection.connect(); /* check content type. */ -- 2.7.4