ttl
log4j2-PatternLayout
实现
jvm添加启动参数:
-javaagent:path/to/transmittable-thread-local-2.x.y.jar
引用maven:
com.alibaba
log4j2-ttl-thread-context-map
1.3.3
runtime
log4j2 xml配置:[%X{traceId}]
log4j2 新增properties配置文件log4j2.component.properties,内容:
log4j2.threadContextMap=com.alibaba.ttl.log4j2.TtlThreadContextMap