开发者

migrate from slf4j+logback to slf4j+log4j

开发者 https://www.devze.com 2023-03-11 05:48 出处:网络
I was using slf4j+logback in my plugin for third-开发者_高级运维party application. New version of main application was switched from log4j to slf4j+log4j+custom appenders....

I was using slf4j+logback in my plugin for third-开发者_高级运维party application. New version of main application was switched from log4j to slf4j+log4j+custom appenders....

It look like that i need to change my code, so logging start working again. Basically to be compatible with log4j (no trace, no parametrized logging).

What will be easiest way for this situation?


Slf4j is just a layer above the actual logging framework.

As long as you were using pure slf4j, you will not need to change any code at all. All you would need to do is to replace the existing logging binding with the new one ie. slf4j-log4j binding in your case


The migrator of SLF4J can be used to solve the issue!

0

精彩评论

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