OK.
Just something that I think would be a good idea.
In Jetspeed... I have implemented a Test framework... very very basic..
Just uses ant to call out to tasks and if they throw an exception, then
the test failed.
The problem is that internally Jetspeed could log an error (NPE, etc)
and the Test might think that everything worked fine. The *perfect*
place to catch this is the Turbine Log.
What I propose is to add a LogListerner interface. IE:
Log.addLogListener( LogListener listener )
Log.removeLogListener( LogListener listener )
The LogListener interface would look like:
public interface LogListener {
public void note( String logname, String description );
public void warn( String logname, String description );
public voicd error( String logname, String description, Throwable t);
//also possibly include all overloaded methods.
}
This way anyone could fork off any log operation, detection, (or
correction mechanism) they wanted. This could also allow us to add
additional functionality. IE we could have multiple default listeners.
IE FileSystemLoggerListener (log the the FS), DatabaseLoggerListener
(log to a DB), ConsoleLoggerListener (log the the console),
SNMPLoggerListener(log to SNMP) (granted some of this stuff can be done
with log4j). My implementation would just cause Ant to terminate with a
build failure by throwing a RuntimeException the second that error() is
called.
Granted I won't have time to do *all* of this and it might take me until
I get Jetspeed (more)stable to do any impl but IMO it is a good idea and
a solid direction towards the future.
Kevin
--
** Should SUN Open Source Java? Please Vote:
http://relativity.yi.org/java **
Kevin A Burton (e-mail: [EMAIL PROTECTED], UIN: 73488596, ZKey:
burtonator)
http://relativity.yi.org | http://www.openprivacy.org
Message to SUN Microsystems: "Please Open Source Java!"
To fight and conquer in all your battles is not supreme excellence;
supreme
excellence consists in breaking the enemy's resistance without fighting.
- Sun Tzu, 300 B.C.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]