1

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?

  • 1
    I do not understand your question. Log4j allows trace and parametrized logging. If you use the slf4j api only, there is no need to change code. Maybe you need to add an log4j.xml configuration file. – Arne Burmeister Jun 09 '11 at 06:24

2 Answers2

4

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

Suraj Chandran
  • 24,433
  • 12
  • 63
  • 94
0

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

Anand Builders
  • 141
  • 1
  • 11