Spring boot 如何使用log4j2jsontemplate布局增加字符串长度
通过引用()我试图增加消息的长度,因为我得到。。。在日志中。 在链接中,提到了使用属性maxStringLength 我尝试用两种方式添加它:Spring boot 如何使用log4j2jsontemplate布局增加字符串长度,spring-boot,logging,log4j,log4j2,slf4j,Spring Boot,Logging,Log4j,Log4j2,Slf4j,通过引用()我试图增加消息的长度,因为我得到。。。在日志中。 在链接中,提到了使用属性maxStringLength 我尝试用两种方式添加它: 在log4j2弹簧中添加 <JsonTemplateLayout eventTemplateUri="classpath:log4j2_JsonEventLayout.json" locationInfoEnabled="true" maxStringLength=&q
<JsonTemplateLayout eventTemplateUri="classpath:log4j2_JsonEventLayout.json"
locationInfoEnabled="true" maxStringLength="30000">
</JsonTemplateLayout>
但是这两种方法都不起作用。我完成了您提供的第一步,它可以在不更改
JsonEventLayout
文件的情况下工作。
"message": {
"$resolver": "message",
"stringified": true,
"maxStringLength":30000
}