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));
}
use of org.glassfish.jersey.logging.LoggingFeature in project jersey by jersey.
the class NoEntityTest method configure.
@Override
protected Application configure() {
ResourceConfig config = new ResourceConfig(HttpMethodResource.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 TimeoutTest method configure.
@Override
protected Application configure() {
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 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 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());
}
Aggregations