Log4j 1.2:%replace {pattern} {regex} {substitution}和%enc {pattern}无法正常工作 [英] Log4j 1.2: %replace{pattern}{regex}{substitution} and %enc{pattern} not working

查看:82
本文介绍了Log4j 1.2:%replace {pattern} {regex} {substitution}和%enc {pattern}无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

log4j 1.2.x是否支持%replace和%enc?相关配置在 log4j 2.x 文档 [1] 中找到,但不适用于旧版本.

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

推荐答案

否.
在log4j 1中可能找不到在log4j 2中找到的功能.根据其站点:

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

Log4j 2 的 API 与 Log4j 1.x 不兼容,但是适配器可用于允许应用程序继续使用Log4j 1.x API.

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/

这篇关于Log4j 1.2:%replace {pattern} {regex} {substitution}和%enc {pattern}无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆