Logback日志中的文本长度限制 [英] Text length limit in logback logging

查看:1410
本文介绍了Logback日志中的文本长度限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用logback.xml配置文件将应用程序SOAP请求记录到接口. SOAP请求本身是通过框架Apache CXF生成的.

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.

配置如下.

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

我们面临的问题是,当SOAP请求/响应的长度超过102410个字符时,其余文本未打印在日志中.因此,我们在日志中打印了部分请求/响应.

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.

是否想知道此长度限制是在logback还是Apache CXF中? 那有什么可以解决的吗?

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?

谢谢

推荐答案

CXF. LoggingInInterceptor拥有一个属性来控制其记录的限制大小.您需要在此处设置限制.

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.

这篇关于Logback日志中的文本长度限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆