Using custom logging filter with LoggingFeature for Jersey Client.

Viewed 2299

I am using Jersey 2.22. I have registered a LoggingFeature that logs requests, responses, headers, payload, etc based on the verbosity that I set however I would like to implement my own custom logging filter that this feature will use.

Looking at the source of LoggingFeature, it doesn't appear this is possible. This seems very inflexible. With previous versions of Jersey, it was very simple to implement a LoggingFilter and register it on the client.

I'd really like to implement my own version of ClientLoggingFilter so I can write a neat line to my log.

Any suggestions? The documentation is lacking IMO. https://jersey.github.io/documentation/latest/logging_chapter.html#d0e15744

1 Answers
Related