I\'ve found a useful article that explains how to make Jersey to use SLF4J instead of JUL. Now my unit test looks like (and it works perfectly):
public class
In my app Jersey logging (with proper pom.xml and logback.xml) works fine only with
SLF4JBridgeHandler.install();
For tests you can make base abstract test with common configuration and extends other JUnit from it:
public abstract class AbstractTest {
private static final Logger LOG = LoggerFactory.getLogger(AbstractTest.class);
static {
SLF4JBridgeHandler.install();
}
@Rule
public ExpectedException thrown = ExpectedException.none();
@Rule
// http://stackoverflow.com/questions/14892125/what-is-the-best-practice-to-determine-the-execution-time-of-the-bussiness-relev
public Stopwatch stopwatch = new Stopwatch() {
@Override
protected void finished(long nanos, Description description) {
...