How to get jersey logs at server?

If you want to turn on logging on the server side, you need to register the LoggingFilter Jersey filter (on the container side).

This filter will log request/response headers and entities.

Here’s what you need to add to your ResourceConfig class:

public class MyApplication extends ResourceConfig {

    public MyApplication() {
        // Resources.


Note that the same filter also works on the client side.

Client client = Client.create();
client.addFilter(new LoggingFilter());

Leave a Comment