Spring Boot Log4j2 isThreadContextMapInheritable设置一直不起做用!!!html
Log4j2 官网文档:https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemPropertiesjava
核心org.apache.logging.log4j.spi.DefaultThreadContextMap.javaapache
重点是给上图圈圈里变量赋值。System.setProperty("log4j2.isThreadContextMapInheritable", Boolean.toString(true))一直不起做用。htm
最终解决办法:blog
红圈圈1里的内容必定要写在红圈圈2以前。文档