Search code examples
cxfinterceptor

Set LoggingOutInterceptor no limit of logger


Im using in the cxf config the interceptor "LogginOutInterceptor". I want to log in the console all the messages (3MB for message) that i send so i decided to put the attribute limit = -1. Well, that works fine, the message that says:

---> message truncated to " + lim + " bytes

Wasnt shown anymore. But now instead of logging the complete message, the log shows this:

Messages:

Message (saved to tmp file):

Filename: /tmp/cxf-tmp-402302/cos4662421026116506665tmp

I tried to avoid this looking for someone with the same issue but i can´t. The message is truncated anyway... Anybody with the same issue?

Thank you.


Solution

  • If this "LogginOutInterceptor" class doesn't work the way you want, just use another class instead:

    Logging request/response with Apache CXF as XML

    I had the same problem long ago and using the class in the answer worked marvellous for me.