Bridging from log4j2 to slf4j

左心房为你撑大大i 提交于 2019-12-07 04:35:51

问题


I'm using Slf4j 1.7.x in conjunction with Logback in my applications (it is a Dropwizard-application). Now we have libraries that use the log4j2 (not log4j), and the logging goes to /dev/null. I can't find a logj2-over-slf4j or log4j2-to-slf4j library in any exising maven application, what is the trick?


回答1:


You may use the Log4j 2 to SLF4J Adapter to route your Log4j2 logs to your slf4j implementation. You are right that slf4j itself does not provide an adapter for log4j2.



来源:https://stackoverflow.com/questions/31071230/bridging-from-log4j2-to-slf4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!