>
> Is it possible to remove the interceptors dynamically also?  I'd have to be 
> able to turn logging on and off dynamically.

If you add the way Dan suggested then they will only affect the
current invocation/exchange

>
>> Alternatively to using the pair of logging interceptors, you may want
>> to experiment with PersistInInterceptor and PersistOutInterceptor in
>> the rt/management module. The PersistOutInterceptor will provide the
>> Exchange details to the injected handler.
>
> What would be the tradeoffs of these two approaches?
>
PersistOutInterceptor will just delegate to the handler - so perhaps
one will be able to log selectively, persist the data onto the db,
etc. The ExchangeData bean may need to be updated a bit though - it
records the input/output streams as Strings as opposed to Input/Output
streams (and thus its setRequestSize/setResponseSize are not needed,
etc...) and it has some properties that need to be collapsed into say
ExceptionData bean, etc...

cheers, Sergey

Reply via email to