[ 
https://issues.apache.org/jira/browse/CXF-2670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834752#action_12834752
 ] 

Rémi Flament commented on CXF-2670:
-----------------------------------

I don't think it's possible since when the ExchangeData is created by 
PersistIninterceptor it does not contain all the data that might be used to 
filter.

As an example, if I want a filter that logs only requests that throw a 
NullPointerException, I need an ExchangeData instance that has the 
exceptionType attribute filled, and it is filled by PersistOutinterceptor, so 
we need PersistOutinterceptor to process the exchangedata in all case right ?

cheers,
Rémi.

> Filter to indicate to PersistOutInterceptor if an exchange should be persisted
> ------------------------------------------------------------------------------
>
>                 Key: CXF-2670
>                 URL: https://issues.apache.org/jira/browse/CXF-2670
>             Project: CXF
>          Issue Type: Improvement
>          Components: Bus
>    Affects Versions: 2.3
>            Reporter: Rémi Flament
>             Fix For: 2.3
>
>         Attachments: cxf-management-data-filter-1.patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Here is a patch that add a filter for ExchangeData instance. 
> If a filter is present, PersistOutInterceptor will use it to check if the 
> message should be persisted.
> The patch contains a default implementation which allows to persist messages 
> with a specific status (i.e log only successful messages or on only requests 
> that caused an error).
> One could write its own ExchangeDataFilter to persist only requests of a 
> certain size, or that causes a specific exception, of only if a certain 
> additionnal property is present, or only for a specific user-agent, and so 
> on...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to