Skip to content

Commit d2c00b0

Browse files
author
David R. MacIver
committed
add SILENT_MODE property for debugging purposes. Turns off all output from the tracer
1 parent 877f84d commit d2c00b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/com/rabbitmq/tools/Tracer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public class Tracer implements Runnable {
6969
new Boolean(System.getProperty("com.rabbitmq.tools.Tracer.NO_DECODE_FRAMES"))
7070
.booleanValue();
7171

72+
public static final boolean SILENT_MODE =
73+
new Boolean(System.getProperty("com.rabbitmq.tools.Tracer.SILENT_MODE"))
74+
.booleanValue();
75+
7276
private static class AsyncLogger extends Thread{
7377
final PrintStream ps;
7478
final LinkedBlockingQueue<Object> queue = new LinkedBlockingQueue<Object>();
@@ -241,7 +245,13 @@ public void reportFrame(Frame f)
241245

242246
public void doFrame() throws IOException {
243247
Frame f = readFrame();
248+
244249
if (f != null) {
250+
251+
if(SILENT_MODE){
252+
f.writeTo(o);
253+
return;
254+
}
245255
if (f.type == AMQP.FRAME_HEARTBEAT) {
246256
if ((inBound && !WITHHOLD_INBOUND_HEARTBEATS) ||
247257
(!inBound && !WITHHOLD_OUTBOUND_HEARTBEATS))

0 commit comments

Comments
 (0)