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
TrafficListener
that logsCommand
atTRACE
level.This implementation checks whether the
TRACE
log level is enabled before logging anything. ThisTrafficListener
should 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 void
read(Command inboundCommand)
Notified for each inboundCommand
.protected boolean
shouldLog(Command command)
void
write(Command outboundCommand)
Notified for each outboundCommand
.
-
-
-
Method Detail
-
write
public void write(Command outboundCommand)
Description copied from interface:TrafficListener
Notified for each outboundCommand
.- Specified by:
write
in interfaceTrafficListener
-
read
public void read(Command inboundCommand)
Description copied from interface:TrafficListener
Notified for each inboundCommand
.- Specified by:
read
in interfaceTrafficListener
-
shouldLog
protected boolean shouldLog(Command command)
-
-