Java-Conversion pattern issues in Log4j
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.
精彩评论