ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Logging Packages output to/via ANT logging mechanism?
Date Tue, 18 Mar 2003 20:49:38 GMT
Adam Jack wrote:
> I tried to find this in the archives, but saw no questions this way around.
> I am trying to debug some complex ant scripts, and also some ant tasks. I
> use the "-debug" option on ant, and get some help. That said, for folks how
> have ant tasks wrappering significant functionality it is hard to "get
> inside" that deeper functionality (as it gets away from the "Task" class).
> Folks today typically use logging (log4j, jdk1.4 util, commons-logging) to
> allow access across the depth of their code, so there is an awful lot of
> code out there that can output via logging utilities.
> Ant seems to have good mechanisms for logging (from tasks) and listening to
> tasks, but does it have (or could it have) a way to insert itself as a
> Logger for one (or all) of these packages? Meaning -- upon start-up w/
> detecting such a package, or upon instruction (in the script) registering
> itself (something sensitive to the current task) as a logger for that
> package and redirecting all logs to one of ant's log methods.
> As such (in principle) I could say "ant -debug" and get all my debug
> information (and in sequence) rather than having to manage the two things
> separately...

I've been looking at providing a commons-logging implmentation, purely 
for some tasks that run in the same JVM. If you want to have forked java 
  programs and junit tests feed directly into ant's loggers, you have 
much more of a challenge ahead of you.


View raw message