Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 24710 invoked from network); 25 Jun 2007 15:21:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2007 15:21:49 -0000 Received: (qmail 88545 invoked by uid 500); 25 Jun 2007 15:21:47 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 88506 invoked by uid 500); 25 Jun 2007 15:21:47 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 88495 invoked by uid 99); 25 Jun 2007 15:21:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2007 08:21:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.65.144.66] (HELO p01c11o143.mxlogic.net) (208.65.144.66) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2007 08:21:43 -0700 Received: from unknown [205.158.200.226] (EHLO exch2.corp.gwsi.com) by p01c11o143.mxlogic.net (mxl_mta-5.1.0-1) with ESMTP id 27ddf764.2176789424.109458.00-010.p01c11o143.mxlogic.net (envelope-from ); Mon, 25 Jun 2007 09:21:22 -0600 (MDT) Subject: RE: Processing Ant log files Date: Mon, 25 Jun 2007 09:21:21 -0600 Message-ID: MIME-Version: 1.0 In-Reply-To: <01cf12192614e0389952b5f7c78a2e4d719a7949@localhost> References: <01cf12192614e0389952b5f7c78a2e4d719a7949@localhost> From: "James Oltmans" To: "Ant Users List" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam: [F=0.0100000000; S=0.010(2007060101); SS=0.500] X-MAIL-FROM: X-SOURCE-IP: [205.158.200.226] X-Virus-Checked: Checked by ClamAV on apache.org That would not work; the process that causes the error is not that = granular. Hundreds of basic files are compiled by one basic program and = that program does not produce a log file for each compilation but the = entire compile process. So there will be hundreds of successful compile = messages (which span multiple lines) and a handful of error messages = (which also span multiple lines).=20 Otherwise that would be an excellent solution, thanks. James=20 -----Original Message----- From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]=20 Sent: Wednesday, June 20, 2007 12:33 AM To: user@ant.apache.org Subject: AW: Processing Ant log files Just thinking ... - redirecting output of exec into logfiles - maybe appending the program name to logfiles - copying logfiles with error into extra directory - merging the logfiles ??? Jan >-----Urspr=FCngliche Nachricht----- >Von: James Oltmans [mailto:joltmans@bolosystems.com]=20 >Gesendet: Mittwoch, 20. Juni 2007 00:14 >An: user@ant.apache.org >Betreff: Processing Ant log files > >Hello all, > >=20 > >I have a problem that I am not sure if ant has a built in method for >handling. I would like to process log files for errors, warnings and >possible system levels messages. The log is being generated by ant but >the echoed output is produced by a legacy system (hence why I=20 >can't just >use a premade task to find all these errors). The errors and warnings >can be 1-50 lines in length. I believe it would be best to parse for >these errors using regexes. It appears that filterchain filters are >geared towards single line applications only. > >=20 > >For example I would like to take the following: > > [exec]=20 >------------------------------------------------------------ > > [exec] COMPILE PROGRAM_A > >=20 > > [exec] Compiling PROGRAM_A > > [exec] compilation finished > > [exec] SUCCESS compiling PROGRAM_A > > [exec]=20 >------------------------------------------------------------ > >=20 > >=20 > > [exec]=20 >------------------------------------------------------------ > > [exec] COMPILE PROGRAM_B > >=20 > > [exec] Compiling PROGRAM_B > > [exec] main program: syntax error at or before > > [exec] ...PWR =3D "This program, dependent files and >dependent facilities is" > > [exec] >--------------------------------------------------------------- >------^Ex >pecting: end-of-file,END > >=20 > > [exec] compilation failed > > [exec] FAILURE compiling PROGRAM_B > > [exec]=20 >------------------------------------------------------------ > >=20 > >And take just the second compilation's output and create a report of >build failures/warnings.=20 > >=20 > >I would like to grab all the compilation failures and other system >failures that occur in the build and include them in a build report >email. Here is my desired output for inclusion in the build report >email: > >Compile failures: > > Compiling PROGRAM_B > > main program: syntax error at or before > > ...PWR =3D "This program, dependent files and dependent >facilities is" > >=20 >--------------------------------------------------------------- >------^Ex >pecting: end-of-file,END > > compilation failed > >=20 > >In order to do this I would have to capture all or most of the text >between the two [exec] ---------------------------------------------- >lines (also note that the errors could be any length so any assumptions >about the number of lines would be insufficient). Is there an=20 >ant native >function or a 3rd party open-source or 3rd party products that can >process log files in this way or should I consider creating a custom >task or custom filterreader? > >=20 > >If your recommendation is a filterreader, what's a good example to >follow? > >=20 > >James Oltmans >SCM Administrator > >Bolo Systems, Inc.=20 >joltmans@bolosystems.com > >=20 > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org