Jersey custom logging request and response entities using filter
By default, Jersey uses JUL for logging -- and does not print request/response entity bodies in logs. To print entity content, you must create your ownLoggingFiler
, and register it in place of default org.glassfish.jersey.filter.LoggingFilter
. In this example, I am creating one such basic CustomLoggingFilter
which extends org.glassfish.jersey.filter.LoggingFilter
and implements ContainerRequestFilter
and ContainerResponseFilter
interfaces so that it can intercept the ongoing requests and responses.Read full article from Jersey custom logging request and response entities using filter
No comments:
Post a Comment