From: David ‘Bombe’ Roden Date: Thu, 30 May 2013 04:44:14 +0000 (+0200) Subject: Improve logging. X-Git-Url: https://git.pterodactylus.net/?p=sonitus.git;a=commitdiff_plain;h=f260375da81abdf84e48545a505be6014e75978a Improve logging. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java index 063a0bc..ab6500e 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java @@ -400,11 +400,11 @@ public class Pipeline implements Iterable { try { final byte[] buffer; try { - logger.finest(String.format("Getting %d bytes from %s...", 4096, source)); + logger.finest(String.format("Getting %d bytes from %s...", 4096, source.name())); buffer = source.get(4096); - logger.finest(String.format("Got %d bytes from %s.", buffer.length, source)); + logger.finest(String.format("Got %d bytes from %s.", buffer.length, source.name())); } catch (IOException ioe1) { - throw new IOException(String.format("I/O error while reading from %s.", source), ioe1); + throw new IOException(String.format("I/O error while reading from %s.", source.name()), ioe1); } List> futures = executorService.invokeAll(FluentIterable.from(sinks).transform(new Function>() { @@ -415,11 +415,11 @@ public class Pipeline implements Iterable { @Override public Void call() throws Exception { try { - logger.finest(String.format("Sending %d bytes to %s.", buffer.length, sink)); + logger.finest(String.format("Sending %d bytes to %s.", buffer.length, sink.name())); sink.process(buffer); - logger.finest(String.format("Sent %d bytes to %s.", buffer.length, sink)); + logger.finest(String.format("Sent %d bytes to %s.", buffer.length, sink.name())); } catch (IOException ioe1) { - throw new IOException(String.format("I/O error while writing to %s", sink), ioe1); + throw new IOException(String.format("I/O error while writing to %s", sink.name()), ioe1); } return null; }