Log4j 1.2: %replace{pattern}{regex}{substitution} and %enc{pattern} not working

为君一笑 提交于 2021-01-29 02:42:06

问题


Is %replace and %enc supported in log4j 1.2.x?. Relevant configurations were found in log4j 2.x documentation [1] but not for older versions.

[1] https://logging.apache.org/log4j/2.x/manual/layouts.html


回答1:


No.
Features found in log4j 2 may not be found in log4j 1. According to their site:

The API for Log4j 2 is not compatible with Log4j 1.x, however an adapter is available to allow applications to continue to use the Log4j 1.x API.

http://logging.apache.org/log4j/2.x/



来源:https://stackoverflow.com/questions/40232714/log4j-1-2-replacepatternregexsubstitution-and-encpattern-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!