Hi,

As discussed last year, I've just finished the first implementation of
Log2Log project.  It's a bytecode manipulation tool that modifies a
JAR to use your favorite logging framework instead of the logging
framework which was employed by the original JAR.

For example, you might want to create a new application on top of
existing two JARs that depend on different logging frameworks (e.g.
Log4J and SLF4J).  Now you have three more JARs (log4j.jar,
slf4j-api.jar and slf4j-log4j12.jar) in your classpath just for
logging.  What makes things worse is when your application is using
other logging framework such as JBoss Common Logging Framework.
Log2Log can remove the three unnecessary JARs very easily.

Please feel free to download and try it and let me know if it's useful
or not.  After unpacking, run bin/log2log and it will show you some
examples and usage in your console:

* http://tinyurl.com/yv9wo2

I did my best to cover the popular methods and classes of all known
logging frameworks.  Please let me know if the conversion fails; I
want to cover as much as possible, except for configuration-related
classes and methods.

Plus, I think the modified JAR will preserve all the debugging
information like line numbers, so it won't lead you to difficulties in
debugging.

To-do:
* Ant task
* Maven 2 plugin

Cheers,
Trustin

PS: Log2Log will fail to convert the current MINA snapshot because of
IoSessionLogger which extends SLF4J Logger.  Once IoSessionLogger goes
away, it should work.
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to