You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jaybytez <ja...@yahoo.com> on 2012/04/18 01:23:22 UTC

LoggingIn(Out)Interceptor disable DataHandler logging

Is there a simple way or feature where you could set a flag to not log out
the DataHandler or the Attachments XOP/MTOM creates?

We are using the LoggingIn(Out)Interceptor to log our messages in all our
envs, but some of our services send significant sized attachments via MTOM
and it would be nice to be able to exclude those from logging.

Thanks...

--
View this message in context: http://cxf.547215.n5.nabble.com/LoggingIn-Out-Interceptor-disable-DataHandler-logging-tp5647852p5647852.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: LoggingIn(Out)Interceptor disable DataHandler logging

Posted by Daniel Kulp <dk...@apache.org>.
On Monday, April 23, 2012 04:36:25 PM jaybytez wrote:
> Thanks for the help...so it looks like if I was at least using the newest
> 2.6.x codebase of CXF, I could take advantage of the setShowBinaryContent
> (is that what this method does...determine whether binary content is
> logged or is this purely for binary sent within the message body)?

I don't think that would work in your case.   That really just checks the 
Content-Type header and determines if it should log at all.   It's mostly 
for the REST cases were you may be getting an image/jpg or something as the 
entire message.   It doesn't really look at each part or anything.

Dan


> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/LoggingIn-Out-Interceptor-disable-DataHan
> dler-logging-tp5647852p5660727.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: LoggingIn(Out)Interceptor disable DataHandler logging

Posted by jaybytez <ja...@yahoo.com>.
Thanks for the help...so it looks like if I was at least using the newest
2.6.x codebase of CXF, I could take advantage of the setShowBinaryContent
(is that what this method does...determine whether binary content is logged
or is this purely for binary sent within the message body)?

--
View this message in context: http://cxf.547215.n5.nabble.com/LoggingIn-Out-Interceptor-disable-DataHandler-logging-tp5647852p5660727.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: LoggingIn(Out)Interceptor disable DataHandler logging

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, April 17, 2012 04:23:22 PM jaybytez wrote:
> Is there a simple way or feature where you could set a flag to not log out
> the DataHandler or the Attachments XOP/MTOM creates?
> 
> We are using the LoggingIn(Out)Interceptor to log our messages in all our
> envs, but some of our services send significant sized attachments via MTOM
> and it would be nice to be able to exclude those from logging.

When you configure the LoggingInInterceptor (and likely the out), do the 
equivalent of:

LoggingInInterceptor in = new LoggingInInterceptor();
in.addAfter(AttachmentInInterceptor.class.getName());
endpoint.getInInterceptors().add(in);

which should move the LoggingInInterceptor to after the attachment handling.  
Thus, only the "root" part would get logged.

Dan


> 
> Thanks...
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/LoggingIn-Out-Interceptor-disable-DataHan
> dler-logging-tp5647852p5647852.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com