Well maybe I'm misunderstanding you, but the xml logger I mentioned actually captures everything that happens in the first build I mentioned. You simply run ant with the following command: ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml You'll actually get no screen output, as Ant redirects it to the xml logger. This is a bulk data collection, but from looking at your code, I think you want to be able to write out particular things at particular times, for which my solution is overkill.
-----Original Message----- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Sent: 23 August 2006 13:50 To: Ant Users List Subject: RE: <buffer> ?! Hi, David /* I normally use a two-build setup with a batch file. The batch file calls the first build, which is the main build, and I tell Ant to use its xml logger. Once that build has finished, the batch file calls a second build that converts the xlm log file from the first build into html using the log.xsl file included with ant in an <xslt> task. Might be not as fine-tuned as you'd like, but it works. */ ok to achieve that i would use <record start ... and ... stop /> to log only the parts i'm really interested in. That's not what i want. i have a build script that makes heavy use of script, macrodefs and variable properties. i want to collect data by the way as it appears in the build workflow and do something with the collection at the end of the build, f.e. mail, write to file ... i just want a bag where i can pack stuff in :-) f.e. something like = <script language="javascript"> function StringBuffer() { this.buffer = []; } StringBuffer.prototype.append = function append(string) { this.buffer.push(string); return this; }; StringBuffer.prototype.toString = function toString() { return this.buffer.join(""); }; var buf = new StringBuffer(); buf.append("hello"); buf.append("world"); project.setNewProperty("foobar",buf.toString()); </script> but accessible in the whole build script Regards, Gilbert -----Original Message----- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Sent: 23 August 2006 10:53 To: [email protected] Subject: <buffer> ?! Hi, in many buildscripts it's required to collect some data during the whole build over and write it to a file, send it as mail ... etc. at the end of the build. it's possible to echo data to a file and write to that file with echo append as data grows, but that repeating echo is kind of boring. What if there were some kind of container where i could append to and when i like it dump the contents of that container to a file or just echo to stdout. Kind of StringBuffer or similar. <buffer name="buffer1" action="append"> my very special note </buffer> [... ] <buffer name="buffer1" action="append"> another special note </buffer> [...] <buffer name="buffer1" action="dump" file="C:/test/myfile.txt" /> Any ideas how to realize that for ant ? Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
