X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FFcpConnectionHandler.java;h=fcceec788c455183881b559c982509a032d6790c;hb=a3955e82568dc1f9a5ee27acebaf59f6d658d910;hp=dbf09696fad32f5d60c6931ae7e2e81c0273cfb7;hpb=508624458578f01a393f8b44f32b98b40054fdc8;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java index dbf0969..fcceec7 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; } @@ -93,7 +100,7 @@ class FcpConnectionHandler implements Runnable { } String field = line.substring(0, equalSign); String value = line.substring(equalSign + 1); - assert fcpMessage != null: "fcp message is null"; + assert fcpMessage != null : "fcp message is null"; fcpMessage.setField(field, value); } catch (IOException ioe1) { throwable = ioe1;