Spring behind the scenes logging

天大地大妈咪最大 提交于 2019-11-29 08:42:48

The problem is solved I think the error come from this

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

I have to route logs from slf4j to log4j because i think Spring use slf4j for logging So i add log4j-slf4j-impl jar and FINALLY it works :-)

    <dependency> 
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j-impl</artifactId>
         <version>2.0-rc2</version>
     </dependency> 

PS : Why i think Spring use slf4j instead of common logging because i add log4j-jcl jar but nothing happened .

    <dependency> 
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-jcl</artifactId>
         <version>2.0-rc2</version>
     </dependency> 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!