Reputation: 5506
I am using Spring with Jersey REST API for REST webservices. I want print the inbound and outbound Payloads (XML Requests Data) to log file/console.
Is there any way todo this.
Thanks
Upvotes: 1
Views: 1695
Reputation: 10379
LoggingFilter can help you with that. You need to provide an instance of this filter to JAX-RS runtime - by default the entity is not printed. See code samples is Registering Resources and Providers in Jersey 2 to see how to register your logger (I am using LoggingFilter
in these samples).
Upvotes: 2