Text length limit in logback logging

2020-04-05 07:48发布

We are logging the application SOAP requests to the interfaces using the logback.xml configuration file. The SOAP requests are itself generated with the framework Apache CXF.

The configuration is given below.

<logger name="org.apache.cxf.interceptor.LoggingInInterceptor" additivity="false">
    <level value="INFO" />
    <appender-ref ref="SOAPENVELOPLOGS" />
</logger>

The problem we are facing is when the SOAP request / response is of length more than 102410 characters, then the rest of text is not printed in the logs. Thus we have partial request / response being printed in the logs.

Would like to know is that this length limitation is in logback or Apache CXF.? And that is there any work around for the same?

Thanks

2条回答
Fickle 薄情
2楼-- · 2020-04-05 08:22

CXF. The LoggingInInterceptor has a property on it to control the limit size of what it logs. You would need to set the limit in there.

查看更多
淡お忘
3楼-- · 2020-04-05 08:33

You may set limit

LoggingInInterceptor lii = new LoggingInInterceptor(); 
lii.setLimit(limit);
查看更多
登录 后发表回答