Max, Alexandre,

Also available from slf4j is the common logging layer implemented atop slf4j layer. This will support both APIs at the same time for a smooth transition from commons logging to slf4j.

Eclipse class finding algorithm will find classes imported to a plugin before it finds the classes 'local' to the plugin. This means that if you name org.apache.log4j packages in your plugin's imports and enable a plugin in your target which exports org.apache packages, then eclipse class finder will find the classes from the log4j plugin. Don't export the org.apache.log4j packages from more than one plugin in your target, eclipse will choose at random. See chapter on OSGi classloading in McAffers RCP book for documentation of the class finding algorithm.


By the way:

I prototyped the following:
1) a log4j plugin containing the apache log4j implementation
2) an slf4j for log4j plugin containing slf4j library and its common logging layer libary.
3) my own custom hibernate plugin minus logging implementation.
4) my rcp plugin that used hibernate and slf4j logging.

This works great. Just so you know: I am not a member of any of the above software teams. But plan to feed this back. to log4j, slf4j and hibernate.

I also found solutions to some other issues like: how to centralize all logging configuration to a single file, and how an appender in hibernate plugin can be found by the log4j plugin, and how to swap to a different slf4j implementation library so jdk logging, nlog4j or simple log

I'm willing to share the details if you are interested.

John



Max Rydahl Andersen wrote:


yes, i also find slf4j interesting, but afaik it won't help solve
the logging problem while other components i use uses common logging.
And it will also still have issues with duplicate configuration etc., but im not sure.

/max


Hi.
When developing eclipse plugins, I ended up with a severe limitation when a
plugins makes reference to the apache-commons-logging library AND each
other.
Well, digging around I found the slf4j library (http://www.slf4j.org/) that
seems to solve my problem.
The cenario where the problem arose was eclipse, where my plugin may
reference or not hibernate's plugin, and both had apache log. Each plugin MAY exist without the other, so each one must have logging, but when they
are both used, we got classloading problems.

I'm testing this new library now in the java.tri plugin. It may be usefull
to the hibernate-tools.







-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to