X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fpacket%2FLLDP.java;fp=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fpacket%2FLLDP.java;h=562d03b7abe503088664c28d5ecb04bb546b1258;hb=600e7a7bf7a59029e85a4811d835133d77b6d8d2;hp=5e7a214f0ea9d723c641c157b6c187b1fd59b87b;hpb=3422d820d463d4693cbbf01c485a1a5a80cc253c;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java index 5e7a214f0e..562d03b7ab 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/LLDP.java @@ -171,8 +171,10 @@ public class LLDP extends Packet { int lldpOffset = bitOffset; // LLDP start int lldpSize = size; // LLDP size - logger.trace("LLDP: {} (offset {} bitsize {})", new Object[] { - HexEncode.bytesToHexString(data), lldpOffset, lldpSize }); + if (logger.isTraceEnabled()) { + logger.trace("LLDP: {} (offset {} bitsize {})", new Object[] { + HexEncode.bytesToHexString(data), lldpOffset, lldpSize }); + } /* * Deserialize the TLVs until we reach the end of the packet */ @@ -212,8 +214,10 @@ public class LLDP extends Packet { throw new PacketException(e.getMessage()); } - logger.trace("LLDP: serialized: {}", - HexEncode.bytesToHexString(serializedBytes)); + if (logger.isTraceEnabled()) { + logger.trace("LLDP: serialized: {}", + HexEncode.bytesToHexString(serializedBytes)); + } return serializedBytes; }