Skip to content

Commit

Permalink
Issue eclipse-ee4j#2016 Logging in tests
Browse files Browse the repository at this point in the history
- important loggers are explicitly named in logging.properties

Signed-off-by: David Matejcek <[email protected]>
  • Loading branch information
dmatej committed Nov 19, 2020
1 parent cb70d89 commit 54e2e6b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions modules/http2/src/test/resources/logging.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 54e2e6b

Please sign in to comment.