The following call to ResourceTestRule sets the default registration with the WARN level:
static { BootstrapLogging.bootstrap(); }
To override, I call BootstrapLogging again and specify the required logging level in my test class after creating the ResourceTestRule , for example:
import ch.qos.logback.classic.Level; import io.dropwizard.logging.BootstrapLogging; ... @ClassRule public static final ResourceTestRule resources = ResourceTestRule.builder() .addResource(UserResource.class) .build(); static { BootstrapLogging.bootstrap(Level.DEBUG); }
Then I can see the log output in the console.
andrius.velykis
source share