From 65c650c5a4c69ec39317904f35361d9d6a070395 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 6 Jun 2013 06:34:51 +0200 Subject: [PATCH] Add logging. --- src/main/java/net/pterodactylus/sonitus/data/AbstractFilter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/pterodactylus/sonitus/data/AbstractFilter.java b/src/main/java/net/pterodactylus/sonitus/data/AbstractFilter.java index 981f42e..539022c 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/AbstractFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/AbstractFilter.java @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicReference; +import java.util.logging.Logger; import com.google.common.collect.Lists; import com.google.common.io.Closeables; @@ -39,6 +40,9 @@ import com.google.common.io.Closeables; */ public abstract class AbstractFilter implements Filter { + /** The logger. */ + private static final Logger logger = Logger.getLogger(AbstractFilter.class.getName()); + /** The name of this filter. */ private final String name; @@ -128,6 +132,7 @@ public abstract class AbstractFilter implements Filter { if (dataPacket.metadata().isPresent() && !dataPacket.metadata().get().equalsIgnoreComment(this.metadata.get())) { metadataUpdated(dataPacket.metadata().get()); } + logger.finest(String.format("Writing %d bytes to %s...", dataPacket.buffer().length, name())); outputStream.write(dataPacket.buffer()); outputStream.flush(); } -- 2.7.4