A way to redirect java logging to Apache's commons logging has been commited on
trunk as of revision 21736. I did a simple test on my machine and it seem to
work, but I would appreciate a test in a real world environment from someone
using Log4J (for example).
The logging can be redirected by invoking one of the following methods:
import org.geotools.util.Logging;
...
Logging.GEOTOOLS.redirectToCommonsLogging();
// Redirect only log records in the "org.geotools" namespace.
// Other log records (e.g. the ones in "java.awt" namespace)
// are still send to the usual java logging handlers.
// or
Logging.ALL.redirectToCommonsLogging();
// Redirect all java log records to commons logging, including
// the one in non-geotools namespace like "java.awt".
In current version, one of the above methods must be invoked at startup time. I
have not deeply investigated how to make such configuration automatic. I may
investigate harder if feedback said that invoking a method a startup time is
not
praticable.
Martin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel