users@jersey.java.net

[Jersey] Re: Logging HTTP Body of Request

From: justin <justin.phillips_at_locusenergy.com>
Date: Thu, 24 Jan 2013 09:05:37 -0800

Ok,
I'm checking server logs and I still don't see the entity logged on the
request.

1 > POST http://localhost:4949/api/groups/
1 > user-agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
1 > host: localhost:4949
1 > accept: application/json
1 > content-type: application/json
1 > content-length: 512
1 >

I have jersey @ the latest version, and I am using glassfish 3.1.2.2. I had
to follow the instructions here
http://jersey.java.net/nonav/documentation/latest/glassfish.html

If you're suggesting that there is something wrong with my build/deploy and
have actually seen the entity logged in the request (basically my log above
but with the json/xml) then i'll chalk it up to my build/deploy process and
try to figure that out.

Thanks again.


On Thu, Jan 24, 2013 at 8:53 AM, Arul Dhesiaseelan <aruld_at_acm.org> wrote:

> If you have this enabled, you should see the request logged on the
> server-side. This works just fine for me. What version of Jersey you are
> using?
>
> <init-param>
> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
> <param-value>com.sun.jersey.api.container.filter.LoggingFilter</param-value>
> </init-param>
>
>
> -Arul
>
>
> On Wed, Jan 23, 2013 at 7:45 AM, justin <justin.phillips_at_locusenergy.com>wrote:
>
>> Hey Arul,
>> Thanks for the help. I toggled DisableEntitylogging to false but I still
>> don't see the body of the request (which is the Entity right?) I toggled it
>> to true, and saw that the response body no longer showed up in the logs.
>> When I set it back to false, the response body came back to the log, but
>> the request body still wasn't there (I'm doing a post). Is it not possible
>> to log the request body out of the box?
>> Thanks
>>
>
>