From 0b264f13b26f68612de49e70010f41f50b6f7101 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 25 May 2013 11:24:11 +0200 Subject: [PATCH] Add logging. --- src/main/java/net/pterodactylus/sonitus/data/Pipeline.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java index b45d346..4e6a457 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java @@ -263,7 +263,9 @@ public class Pipeline { final Metadata metadata = firstMetadata = source.metadata(); final byte[] buffer; try { + logger.finest(String.format("Getting %d bytes from %s...", 4096, source)); buffer = source.get(4096); + logger.finest(String.format("Got %d bytes from %s.", buffer.length, source)); } catch (IOException ioe1) { throw new IOException(String.format("I/O error while reading from %s.", source), ioe1); } @@ -279,7 +281,9 @@ public class Pipeline { sink.metadataUpdated(metadata); } try { + logger.finest(String.format("Sending %d bytes to %s.", buffer.length, sink)); sink.process(buffer); + logger.finest(String.format("Sent %d bytes to %s.", buffer.length, sink)); } catch (IOException ioe1) { throw new IOException(String.format("I/O error while writing to %s", sink), ioe1); } -- 2.7.4