Hello,
I've been thinking of some ways to improve logging so it is more
integrated with the DVSL Task and the DVSL class itself.
1. Add a logfile attribute to the DVSL Task so the name of the log file
can be specified directly rather than having to specify it via the
<velconfig> element. If no logfile attribute is specified, the log file
would default to Ant's basedir/dvsl.log.
To implement this, I'd add a setLogFile method to the DVSL class. If
called, this would set the property VelocityEngine.RUNTIME_LOG to the name
of the specified file. If the setVelocityConfig method is called after
this one, the existing Map will be overlayed into the one passed by
setVelocityConfig thus preventing the specified log file name from being
lost.
2. Implement a generic Velocity logger that delegates to Ant's logging
API. My thought is this should be the default method of logging from the
DVSL Task unless the logfile attribute is specified as described above.
The Velocity log level would call Ant's Task.log method with the
corresponding log level. This means informational logging from Velocity
would be dropped unless you run Ant with the -verbose or -debug options.
If better control is needed, a new loglevel attribute could be added to
the DVSL Task which lets the Velocity logging level be specified
independantly of Ant's logging level.
This logger wouldn't be specific to DVSL. It could be utilized by any
Ant task that runs Velocity for some processing. Because of this, should
I put this logger in the Velocity runtime.log package with the idea that
it could be pulled out later and moved to the Velocity distribution?
I have most of the above already implemented but before I go much further,
would like some feedback to make sure these are appropriate enhancements.
-Bill
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>