logging/instrumentation: address review comments, remove InstrumentationOptions
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFInstrumentationOptions.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFInstrumentationOptions.java
deleted file mode 100644
index 97d7165..0000000
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFInstrumentationOptions.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.projectfloodlight.openflow.protocol;
-
-public final class OFInstrumentationOptions {
- public static final boolean TRACE_READS = false;
-
- private OFInstrumentationOptions() { }
-}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
index f024fa3..1a1ac6a 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
@@ -4,7 +4,6 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.projectfloodlight.openflow.exceptions.OFParseError;
-import org.projectfloodlight.openflow.protocol.OFInstrumentationOptions;
import org.projectfloodlight.openflow.protocol.OFMessageReader;
import org.projectfloodlight.openflow.protocol.Writeable;
import org.slf4j.Logger;
@@ -60,14 +59,12 @@
public static <T> List<T> readList(ChannelBuffer bb, int length, OFMessageReader<T> reader) throws OFParseError {
int end = bb.readerIndex() + length;
Builder<T> builder = ImmutableList.<T>builder();
- if(OFInstrumentationOptions.TRACE_READS)
- if(logger.isTraceEnabled())
- logger.trace("readList(length={}, reader={})", length, reader.getClass());
+ if(logger.isTraceEnabled())
+ logger.trace("readList(length={}, reader={})", length, reader.getClass());
while(bb.readerIndex() < end) {
T read = reader.readFrom(bb);
- if(OFInstrumentationOptions.TRACE_READS)
- if(logger.isTraceEnabled())
- logger.trace("readList: read={}, left={}", read, end - bb.readerIndex());
+ if(logger.isTraceEnabled())
+ logger.trace("readList: read={}, left={}", read, end - bb.readerIndex());
builder.add(read);
}
if(bb.readerIndex() != end) {