开发者

Java-Conversion pattern issues in Log4j

开发者 https://www.devze.com 2023-02-22 21:38 出处:网络
Can even tel me how should i change a log 4j conversion pa开发者_如何转开发ttern for a single log message.

Can even tel me how should i change a log 4j conversion pa开发者_如何转开发ttern for a single log message. if i change it using the pattern layout class the pattern for the other logmessage in the class is also getting changed. along with that im getting both patterns. the one in the class and the log4j.xml file


Basically you use 2 different appenders.

Here is how you do it with a LevelMatchFilter, for differentiating logger.error() from logger.warn() for example.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号