I'm using dropwizard with jersey. I'm having a problem with the path in a resource and would like to debug it. How do you configure the jersey environment variable for this? The following does not work.
@ClassRule
public static final ResourceTestRule resources = ResourceTestRule.builder()
.addResource(UserResource.class)
.addProperty("jersey.config.server.tracing.type", "ON")
.build();
The following call in ResourceTestRule
sets up the default logging with WARN
level:
static {
BootstrapLogging.bootstrap();
}
To override, I call BootstrapLogging
again and indicate the required logging level in my test class after the ResourceTestRule
creation, e.g.:
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 my logging output in the console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With