From: David ‘Bombe’ Roden Date: Fri, 20 Nov 2009 08:26:41 +0000 (+0100) Subject: Use logging for debug output. X-Git-Tag: v0.1.2.1~8 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=631bb9032d93a7b89d949b103adb22bd9286ac4a;p=jFCPlib.git Use logging for debug output. --- diff --git a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java index dbf0969..4d27038 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java +++ b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java @@ -22,6 +22,10 @@ import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.nio.charset.Charset; +import java.util.logging.Level; +import java.util.logging.Logger; + +import net.pterodactylus.util.logging.Logging; /** * Handles an FCP connection to a node. @@ -30,6 +34,9 @@ import java.nio.charset.Charset; */ class FcpConnectionHandler implements Runnable { + /** The logger. */ + private static final Logger logger = Logging.getLogger(FcpConnectionHandler.class.getName()); + /** The underlying connection. */ private final FcpConnection fcpConnection; @@ -70,7 +77,7 @@ class FcpConnectionHandler implements Runnable { } try { String line = readLine(); - System.out.println("read line: " + line); + logger.log(Level.FINEST, "read line: %1$s", line); if (line == null) { break; }