ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ALIA-SC, David" <>
Subject About to write a "DatabaseLogger" - any advice ?
Date Tue, 18 Mar 2003 16:38:46 GMT

I'm about to write another logger, that inserts into a database each action
(I need it for precise reporting).
These logs are in a master-slave relationship, I mean one action for
multiple details (in other words, two database tables).

My idea about this is to trigger these events like this :

- BuildStarted : Insert main action in database, default global status is

- BuildFinished : If build failed, update global status to "KO"

- TargetStarted : Insert action's details in database, default status is

- TargetFinished : If build failed, update status to "KO"

But here are my questions :

* I need to get some extra properties, defined during the build process. Can
I get these values into the Logger ?

* Do I roughly code connection cases (open() for BuildStarted, close() for
BuildFinished) into these methods ? By extension, is there any interest to
have an "opened" architecture, I mean by designing generic classes for
connection, generic methods etc. or rather "hard code" it within the methods
above (*) ?

For information, I've already made an ANT framework that does it very well
but I need to explicitely call these tasks. Now I want to have these data
logged automatically...

Thanks for any advice.


(*) Of course, I'd want to have generic methods to insert/update infos into
database (eg UpdateMasterAction(), InsertDetailAction()...) but is it easy ?
My java skills are medium (though I've coded some specific ANT tasks on my
own... :-))

View raw message