views:

328

answers:

3

Can custom appenders created for log4j (extending AppenderSkeleton) be used with new logback framework? I know that logback comes with its own set of appenders similar to log4j, but is this possible to re-use existing ones? How?

+1  A: 

No logback appenders need to implement Appender. Should be feasible to write a wrapper appender if you wanted to use an existing log4j appender.

objects
+2  A: 

The following document describes how to "[migrate] custom log4j components such as appenders or layouts to logback-classic":

http://logback.qos.ch/manual/migrationFromLog4j.html

Brandon E Taylor
+3  A: 

It should be easy to port a log4j appender to logback. There is even a document describing the process. However, if you run into problems (which you should not), don't hesitate to ask for help on the logback-dev mailing list.

Ceki
Thanks, Ceki, I would certainly have to port some stuff, we'll see how it goes..
Dima
It was very easy and works like a champ. Good work!
Dima
Good to hear. Thanks for letting me know.
Ceki