`

关于log4j中log4j.properties和log4j.xml的加载顺序

阅读更多
经过查看LogManager.java

// if the user has not specified the log4j.configuration
// property, we search first for the file "log4j.xml" and then
// "log4j.properties"

明确了,当用户没有设置log4j.configuration属性,则首先查找log4j.xml,然后查找log4j.properties。
log4j.properties以后已经不再推荐使用了。
分享到:
评论
1 楼 飞天奔月 2012-03-25  
怀着好奇的 ❤, 试试两个的顺序,  搜了下google 就来到这个帖子

相关推荐

Global site tag (gtag.js) - Google Analytics