diff --git a/modules/http2/src/test/java/org/glassfish/grizzly/http2/AbstractHttp2Test.java b/modules/http2/src/test/java/org/glassfish/grizzly/http2/AbstractHttp2Test.java index 4d5a951666..dcbb038d8f 100644 --- a/modules/http2/src/test/java/org/glassfish/grizzly/http2/AbstractHttp2Test.java +++ b/modules/http2/src/test/java/org/glassfish/grizzly/http2/AbstractHttp2Test.java @@ -16,10 +16,12 @@ package org.glassfish.grizzly.http2; +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URL; import java.util.Arrays; import java.util.Collection; +import java.util.logging.LogManager; import java.util.logging.Logger; import org.glassfish.grizzly.Buffer; @@ -49,6 +51,15 @@ * @author Alexey Stashok */ public abstract class AbstractHttp2Test { + static { + try { + LogManager.getLogManager().readConfiguration(AbstractHttp2Test.class.getResourceAsStream("/logging.properties")); + } catch (SecurityException | IOException e) { + e.printStackTrace(); + } + } + + protected static final Logger LOGGER = Grizzly.logger(AbstractHttp2Test.class); private volatile static SSLEngineConfigurator clientSSLEngineConfigurator; diff --git a/modules/http2/src/test/resources/logging.properties b/modules/http2/src/test/resources/logging.properties new file mode 100644 index 0000000000..c280aa86dd --- /dev/null +++ b/modules/http2/src/test/resources/logging.properties @@ -0,0 +1,13 @@ +handlers=java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.encoding=UTF-8 +java.util.logging.ConsoleHandler.level=ALL + +# Note: NIOOutputSinksTest fails with too verbose logging + +.level=INFO +org.glassfish.grizzly.http2.level=INFO +org.glassfish.grizzly.filterchain.DefaultFilterChain.level=INFO +org.glassfish.grizzly.http2.DefaultInputBuffer.level=INFO +org.glassfish.grizzly.http2.Http2Stream.level=INFO +org.glassfish.grizzly.http2.NetLogger.level=FINE