From 4c9c49fa5541ed5ff3b32bd8f7bc87451554a878 Mon Sep 17 00:00:00 2001 From: akwizgran <michael@briarproject.org> Date: Thu, 6 Dec 2012 15:36:51 +0000 Subject: [PATCH] Logging to debug reliability layer. --- .../src/net/sf/briar/plugins/modem/ReliabilityLayer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/briar-core/src/net/sf/briar/plugins/modem/ReliabilityLayer.java b/briar-core/src/net/sf/briar/plugins/modem/ReliabilityLayer.java index d27e599b4b..896d24f62a 100644 --- a/briar-core/src/net/sf/briar/plugins/modem/ReliabilityLayer.java +++ b/briar-core/src/net/sf/briar/plugins/modem/ReliabilityLayer.java @@ -1,5 +1,6 @@ package net.sf.briar.plugins.modem; +import static java.util.logging.Level.INFO; import static java.util.logging.Level.WARNING; import java.io.IOException; @@ -75,12 +76,14 @@ class ReliabilityLayer implements ReadHandler, WriteHandler { // The modem calls this method to pass data up to the SLIP decoder public void handleRead(byte[] b) throws IOException { if(!valid) throw new IOException("Connection closed"); + if(LOG.isLoggable(INFO)) LOG.info("Read " + b.length + " bytes"); decoder.handleRead(b); } // The SLIP encoder calls this method to pass data down to the modem public void handleWrite(byte[] b) throws IOException { if(!valid) throw new IOException("Connection closed"); + if(LOG.isLoggable(INFO)) LOG.info("Writing " + b.length + " bytes"); if(b.length > 0) writes.add(b); } } -- GitLab