On Mon, 28 Aug 2000, burtonator wrote:
> 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.

Just FYI there is now a unit testing framework in Avalon src
...

> 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:

well actually there is also a logging framework in Avalon at
this time. Instead of adding log listeners you can do the
equivelent by setting the default LogTarget. The LogTarget
gets handed log messages - one of the fields holds the log
level and thus you could work it via that.

> 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.

well currently the logger implementation in Avalon allows
filtering but can only write to files. This is because my
other implementations (Mail, IRC channel, stdout) are owned
by companies - as soon as I remember to get them to OK an OS
release I will add them :P  

> 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.

UnitTesting is a godsend :P and loggin is also a champ - I
wish more OS projects encouraged it :P

Cheers,

Pete

*--------------------------------------------------*
| Latrobe University,     | Does the name 'Pavlov' |
| Bundoora, Australia     |    ring a bell ?       |
*--------------------------------------------------*



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to