Martin Desruisseaux ha scritto: > In order to implements Log4JLogger, I upgrated the Log4J dependencies in the > parent pom.xml from 1.2.6 to 1.2.12. I also upgrated Commons-logging from > 1.0.4 > to 1.1 for consistency (the later depends on Log4J 1.2.12). > > I did this upgrate because Log4JLogger maps Java "finest" level to Log4J > "trace" > level, but the later has been added in Log4J only in 1.2.12. I think the > GeoServer would need to make this upgrate too if they can? > > However for some mysterious reason, Maven 2.0.6 (at least on my machine) seems > to honors our Log4J version at compile time, but ignores it at test time. As a > consequence: > > * When compiling with Maven, no problem. > * When running outside Maven, no problem provided that log4J version is > 1.2.12. > * When testing with Maven, no problems provided that there is no call to > Logging.setLoggingFramework(LOG4J). > > However if Logging.setLoggingFramework(LOG4J) is invoked somewhere in a test > run > by Maven, and if a test tries to log at "finest" level, then we may get the > following error: > > NoSuchMethodError: org.apache.log4j.Logger.trace(Ljava/lang/Object;)V > > Everything seems fine with Geotools, but I don't know for GeoServer. If you > encounter the above error, we have a choice: either avoid to redirect logging > during Maven tests, or we can avoid redirecting Java "finest" to Log4J "trace" > in Log4JLogger. Or maybe Maven 2.0.7 fixes the issue?
Hmm... we'll try and see, afaik we're using 1.2.14 in GeoServer so we have trace method around. I'll let you know as soon as I have enough material to do a real test: GeoTools switched and the task to switch GeoServer as well... since it seems you're doing the switch on GeoTools, can you send the ant task definition to the list so that I can apply the same change in GeoServer and see how things are working? Cheers Andrea ------------------------------------------------------------------------- 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
