use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class TraceSupportTest method configure.
@Override
protected Application configure() {
ResourceConfig config = new ResourceConfig(TracingResource.class);
config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
final Resource.Builder resourceBuilder = Resource.builder(ROOT_PATH_PROGRAMMATIC);
resourceBuilder.addMethod(TRACE.NAME).handledBy(new Inflector<ContainerRequestContext, Response>() {
@Override
public Response apply(ContainerRequestContext request) {
if (request == null) {
return Response.noContent().build();
} else {
return Response.ok(stringify((ContainerRequest) request), MediaType.TEXT_PLAIN).build();
}
}
});
return config.registerResources(resourceBuilder.build());
}
use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class ManagedClientTest method configure.
@Override
protected Application configure() {
ResourceConfig config = new ResourceConfig(PublicResource.class, InternalResource.class, CustomHeaderFeature.class).property(ClientA.class.getName() + ".baseUri", this.getBaseUri().toString() + "internal");
config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
return config;
}
use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class TimeoutTest method configure.
@Override
protected Application configure() {
final ResourceConfig config = new ResourceConfig(TimeoutResource.class);
config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
return config;
}
use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class AuthTest method configure.
@Override
protected Application configure() {
ResourceConfig config = new ResourceConfig(AuthResource.class);
config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
return config;
}
use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class Utils method configure.
public static void configure(ResourceConfig configurable) {
configurable.packages(Utils.class.getPackage().getName());
// OR:
// configure((Configurable)configurable);
// configurable.register(PreMatchingContainerRequestFilter23.class);
// configurable.register(PreMatchingContainerRequestFilter42.class);
// configurable.register(ContainerRequestFilter68.class);
// configurable.register(ContainerRequestFilterNoPriority.class);
// configurable.register(ContainerResponseFilter5001.class);
// configurable.register(ContainerResponseFilterNoPriority.class);
// configurable.register(TestExceptionMapper.class);
// configurable.register(TestExtendedExceptionMapperGeneric.class);
// configurable.register(TestExtendedExceptionMapperRuntime.class);
// configurable.register(Resource.class);
// configurable.register(SubResource.class);
configurable.register(new LoggingFeature(Logger.getAnonymousLogger(), LoggingFeature.Verbosity.PAYLOAD_ANY));
}
Aggregations