开发者

Where does SLF4J pick up the Log4j Property file from?

开发者 https://www.devze.com 2023-03-01 03:10 出处:网络
Where does SLF4J pick up the Log开发者_JAVA百科4j Property file from?Since SLF4J is just a thin facade in front of log4j it shouldn\'t pick log4j properties itself and let log4j pick along its own pro

Where does SLF4J pick up the Log开发者_JAVA百科4j Property file from?


Since SLF4J is just a thin facade in front of log4j it shouldn't pick log4j properties itself and let log4j pick along its own properties.

So it will be log4j.properties or log4j.xml in the class path if the configuration is not being done or loaded programatically. If you want to see what log4j does during configuration run you application with -Dlog4j.debug.


It doesn't. Log4j picks up the log4j.xml/log4j.property files as usual with log4j - slf4j is just a facade giving a common API usable with all common logging frameworks.

The thing that makes slf4j point to log4j is that you have added a slf4j bridge jar to log4j.

0

精彩评论

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