Package com.rabbitmq.client.impl
Class LogTrafficListener
- java.lang.Object
-
- com.rabbitmq.client.impl.LogTrafficListener
-
- All Implemented Interfaces:
TrafficListener
public class LogTrafficListener extends Object implements TrafficListener
TrafficListenerthat logsCommandatTRACElevel.This implementation checks whether the
TRACElog level is enabled before logging anything. ThisTrafficListenershould only be activated for debugging purposes, not in a production environment.- Since:
- 4.9.0
- See Also:
TrafficListener,ConnectionFactory.setTrafficListener(TrafficListener)
-
-
Field Summary
-
Fields inherited from interface com.rabbitmq.client.TrafficListener
NO_OP
-
-
Constructor Summary
Constructors Constructor Description LogTrafficListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidread(Command inboundCommand)Notified for each inboundCommand.protected booleanshouldLog(Command command)voidwrite(Command outboundCommand)Notified for each outboundCommand.
-
-
-
Method Detail
-
write
public void write(Command outboundCommand)
Description copied from interface:TrafficListenerNotified for each outboundCommand.- Specified by:
writein interfaceTrafficListener
-
read
public void read(Command inboundCommand)
Description copied from interface:TrafficListenerNotified for each inboundCommand.- Specified by:
readin interfaceTrafficListener
-
shouldLog
protected boolean shouldLog(Command command)
-
-