I am using jersey for a REST WS. How do I enable jersey logs at server side?
Long story: I get a clientside exception - but I don\'t see anything in tomcat logs [It
Jersey 2 has deprecated LoggingFilter and you now need to use LoggingFeature. In order to use it with a client you can use the following snipette:
this.client = ClientBuilder
.newBuilder()
.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY_CLIENT, LoggingFeature.Verbosity.PAYLOAD_ANY)
.property(LoggingFeature.LOGGING_FEATURE_LOGGER_LEVEL_CLIENT, "WARNING")
.build();
and on the server side:
ResourceConfig config = new ResourceConfig(HelloWorldResource.class);
config.register(LoggingFeature.class);