On Tue, Oct 12, 2010 at 10:20 AM, Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> wrote: > Because most unit tests do not set up the geotools logging environment, > there is no obvious way outside the code to enable logging while running > a single test. > > Do any developers have a useful way of enabling and adjusting logging > for tests? I am thinking of JVM environment variables. I have often > tried but seem to be defeated by the gap between commons-logging and > java.utils.logging, which seems to be designed to defeat all logging > outside a fully configured environment.
Yeah, java logging is quite lame config wise. Have a look at: modules/library/jdbc/src/test/java/org/geotools/jdbc/JDBCTestSupport.java That class has programmatic logging setup that we uncomment when we really need logging going. Maybe not the perfect solution, but proved to be useful in more than one occasion (thanks Justin for setting it up) Cheers Andrea ----------------------------------------------------- Ing. Andrea Aime Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ----------------------------------------------------- ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel