ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: per-task diagnostics
Date Tue, 13 Feb 2007 05:12:07 GMT
On Wed, 07 Feb 2007, Steve Loughran <stevel@apache.org> wrote:

> I've been thinking about how we could improve our diagnostics, by
> moving more of the diags into tasks themselves. Every task could
> have a diagnostics(PrintStream) method that would be called to do
> the diags.

I think it should get a Project instance instead of a PrinStream so
that output goes to the logger attached, whatever that may be.

Of course the PrinStream could be wrapping a LogOutputStream, but that
would be taking away the opportunity to log at different levels.

> 1. we could introspect for a public static void
> diagnostics(PrintStream) throws BuildException method. This would
> let us diagnose even if you cannot instantiate the task enough for
> new() to work.

Makes sense.

> 2. or we'd use an interface Diagnostics that things could implement

In many cases where required libraries are not there, we will fail to
create a task instance.  In some cases we may even be unable to create
the class, but the "can't create an instance" cases are probably more
common.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message