users@jersey.java.net

Re: [Jersey] LoggingFilter

From: Casper Bang <casper.bang_at_gmail.com>
Date: Mon, 15 Feb 2010 16:20:33 +0100

Subclass LoggingFilter and check with a regular expression whether to
log or not? I do a similar thing for caching filter, it feels a little
AOP like. You could probably take this a step further and create a
provider such that you can decorate your resources with logging annotations.

/Casper

Ricardo Borillo wrote:
> Hi all,
>
> I have a JAX-RS server webapp with LogginFilter enabled in the web.xml:
>
> <init-param>
> <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
> <param-value>com.sun.jersey.api.container.filter.LoggingFilter</param-value>
> </init-param>
>
> I have one method that generates too much log information because of
> the type of response ...
> Is it possible to disable logging for an specific method?
>
> Thanks in advance.
>
> ---
> Regards,
> ====================================
> Ricardo Borillo Domenech
> http://xml-utils.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>