Andrea Aime a écrit :
> The way seems to use
> Logging.setLoggingFramework(LoggingFramework.LOG4J). Now, I find
> this a little convoluted, why can't we set the log factory directly
> (making it a public class of course).
I was not sure how it would behave if Commons-logging or Log4J JARs are not in
the classpath. In the old implementation, it threw NoClassDefFoundError. In the
new implementation, I'm not sure since LoggerFactory is an additional level of
indirection.
I suspect that it may be JVM implementation-dependent. If we let users invoke
setLoggerFactory(...) themself, then they have to handle ClassDefNotFoundError
themselves too. The LoggingFramework stuff was an attempt to take care of this
task. Note that the implementation use reflection (there is no "real" reference
to Log4JLogger or CommonsLogger anywhere), so we should not have any trouble if
Commons-logging or Log4J is not in the classpath. I'm not sure that we have this
garantee if we make "real" references to the Log4JLogger class.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel