类似这种:
java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.log4j.Category.callAppenders(Category.java:204) - waiting to lock <0x00000007800020a0> (a org.apache.log4j.spi.RootLogger) at org.apache.log4j.Category.forcedLog(Category.java:391) at org.apache.log4j.Category.log(Category.java:856)
因为里边用了synchronized同步锁,导致性能上不来。
想办法换log4j2或者logback吧
或者搭个桥?参考这个: https://www.cnblogs.com/hujunzheng/p/9937097.html 看着调log4j,实际调log4j2
|