users@jersey.java.net

Re: [Jersey] client LoggingFilter

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 13 Mar 2009 16:19:00 +0100

On Mar 13, 2009, at 4:07 PM, Arul Dhesiaseelan wrote:

> Thanks Paul and Naresh.
>
> I was looking at something like LoggingFilter(Logger logger), which
> allows me to pass on my existing logger instance.

What should be the log level? that declared by the logger itself? e.g.

   logger.log(logger.getLevel(), ...);


>
>
> I would prefer to use either StringBuffer or StringBuilder to write
> these messages.
>

OK.

Paul.


> -Arul
>
> Paul Sandoz wrote:
>>
>> On Mar 13, 2009, at 7:44 AM, Naresh wrote:
>>
>>> Hi Arul,
>>>
>>> you could use the LoggingFilter(PrintStream stream) constructor to
>>> create the filter.
>>> The stream might be set to your log file.
>>>
>>
>> Same for the server side as well, although i think we could improve
>> things to pick in terms of registration to avoid registering an
>> instance.
>>
>> In general when printing to a logging stream is it more preferable
>> to log the request or response in a StringBuffer then write the
>> whole string out to the logging stream?
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>