Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java')
-rw-r--r--jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java
index 38451bb383..64b417dae5 100644
--- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java
+++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventCapture.java
@@ -18,10 +18,6 @@
package org.eclipse.jetty.websocket.common.events;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.startsWith;
-
import java.util.regex.Pattern;
import org.eclipse.jetty.toolchain.test.EventQueue;
@@ -29,6 +25,10 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.junit.Assert;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.startsWith;
+
@SuppressWarnings("serial")
public class EventCapture extends EventQueue<String>
{
@@ -67,7 +67,8 @@ public class EventCapture extends EventQueue<String>
public void add(String format, Object... args)
{
String msg = String.format(format,args);
- LOG.debug("EVENT: {}",msg);
+ if (LOG.isDebugEnabled())
+ LOG.debug("EVENT: {}",msg);
super.offer(msg);
}

Back to the top