standard version of log4j

2005-11-07 Thread Byron Miller
Is there any way to make sure all plugins/modules
reference a standard version of log4j?  seems to me
there are atlest 3 different versions (although minor)

# find . | grep log4
./plugins/parse-pdf/log4j-1.2.9.jar
./plugins/parse-pdf/PDFBox-0.7.2-log4j.jar
./plugins/parse-rss/log4j-1.2.6.jar
./plugins/clustering-carrot2/log4j-1.2.11.jar




Re: standard version of log4j

2005-11-07 Thread Stefan Groschupf
That is the sense of the plugin system that each plugin can have own  
libraries and do not share or share them with other plugins.

Stefan
Am 07.11.2005 um 16:08 schrieb Byron Miller:


Is there any way to make sure all plugins/modules
reference a standard version of log4j?  seems to me
there are atlest 3 different versions (although minor)

# find . | grep log4
./plugins/parse-pdf/log4j-1.2.9.jar
./plugins/parse-pdf/PDFBox-0.7.2-log4j.jar
./plugins/parse-rss/log4j-1.2.6.jar
./plugins/clustering-carrot2/log4j-1.2.11.jar







Re: standard version of log4j

2005-11-07 Thread Jérôme Charron
 hmmm.. so that means if we want to customize logging
 it would be for every plugin potentially?

 Perhaps a common logger would atleast make some degree
 of sense.

I really think it make sense.
When I fixed the issue about plugin dependencies, I began to create a log4j
plugin
in order to remove all the log4j versions imported by many plugins (what you
suggest).

But it is not so simple.
In fact, parse-rss and parse-pdf uses in their code some log4j imports just
to redirect
the log4j output to the java's native logger (They don't really customize
it).
The imports of log4j are only used by some others jars imported by the
plugins (not a direct dependency).
If these jars the plugins depends on use some common log4j features, it
seems there's no problem to remove
the log4j jars in each plugin and add a dependency to a new lib-log4j
plugin. But the only ways to check for no regression are:
* Look in the source code of PDFBox and other jars imported by plugins and
that use log4j and checks that they are able to use any other log4j-1.2.xversion
* Create a lib-log4j plugin, remove all log4j jars and add a dependency to
lib-log4j plugin in all the plugins that previously imported log4j.jar , and
then perform a runtime test of these plugins and cross fingers

But sure, I really think it make sense.

Jérôme

--
http://motrech.free.fr/
http://www.frutch.org/