ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject commons logging q
Date Sat, 18 Jan 2003 08:19:42 GMT
so its pretty easy to do an implementation of the commons log that sends the
messages to ant at the appropriate level, but I am stuck at the factory

I need the current project (and preferably task) to set up the logger. I
suppose for custom tasks (like the Axis ones) we just choose and set up the
factory. But I know that the Axis code just calls LogFactory.getLog() ,
which retrieves a factory created by the standard commons algorithm, or that
set by the system properties (and hence created with an empty constructor).
And although the library caches the factory on a classloader by classloader
basis, there is no way to put a manually created factory into the cache.

The only way I can see that works is

(a) set some static prop in our logfactory impl to point to the current
project, maybe task
(b) set the system property org.apache.commons.logging.Log  to our class
(c) have the log factory get its data from the statics
(d) write something to hide (a) and (b) from the general public out of

Any other better solution out there?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message