Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 37316 invoked by uid 500); 7 Jun 2001 17:10:48 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 37246 invoked from network); 7 Jun 2001 17:10:38 -0000 Message-ID: <011f01c0ef74$b5564ab0$1514000a@GILAMONSTER> From: "Erik Hatcher" To: References: <13EFBBC3DB08D511A5CB0002A5095C5215F947@mail.workscapeexpress.com> Subject: Re: How do I get the log file name? Date: Thu, 7 Jun 2001 10:10:08 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N You could always do this when you run Ant: ant -Dbuild.log=logfile -logfile logfile and use the ${build.log} property to get the filename. Just make sure that the two "logfile" strings are always the same. I took a quick glance at Ant's source code and did not see anywhere where the log file name is made available as a property (although I suppose it could be hidnig somewhere I didn't look). Erik ----- Original Message ----- From: "O'Hara, Patrick" To: Sent: Thursday, June 07, 2001 9:07 AM Subject: RE: How do I get the log file name? > I was hoping to use the mail task in Ant. In Ant I know that the build was > successful, and I must know what the log file name is somewhere. Is it in a > property? What is the name? I have everything else to use the mail task > except the log file name. > > Patrick O'Hara > 262-408-3849 > patrick.ohara@workscape.com > > > > > -----Original Message----- > From: Steve Donie [mailto:sdonie@zycor.lgc.com] > Sent: Thursday, June 07, 2001 10:02 AM > To: 'ant-user@jakarta.apache.org' > Subject: RE: How do I get the log file name? > > > You can also do this, which doesn't require a logger. I have a build.bat > (Win2K) that calls Ant: > > . > . > . > call ant.bat -emacs -buildfile %DS_HOME%\tools\build.xml %DO_DS_LOG% > %*||goto FAILED > > :SUCCEEDED > echo Build.bat success > if not defined DO_DS_LOG goto BUILD_DONE > echo Build.bat sending mail > call ant.bat -emacs -DBuildResult=Success -buildfile > %DS_HOME%\tools\build.xml SendMail&goto BUILD_DONE > > :FAILED > echo Build.bat fail > if not defined DO_DS_LOG goto BUILD_DONE > echo Build.bat sending mail > call ant.bat -emacs -DBuildResult=Failed -buildfile > %DS_HOME%\tools\build.xml SendMail&goto BUILD_DONE > > :BUILD_DONE > . > . > . > > > DO_DS_LOG is set to -logfile=build.log for the nightly build machine, and > not set on developers machines. The ||goto FAILED at the end of the call to > ant.bat will go to the FAILED label if the build fails, or fall through to > SUCCEEDED. In my build.xml, I have a target SendMail that looks vaguely like > this. I actually create a smaller summary of the build called BuildMail.log > using the echo task, but you could also just mail out build.log. > > > > tolist="${MailtoList}" > subject="Results of Tahoe nightly build ${label} (${BuildResult})" > files="BuildMail.log" > mailhost="mailhost" /> > > > > > > > > -----Original Message----- > From: Erik Hatcher [mailto:erikhatcher@earthlink.net] > Sent: Thursday, June 07, 2001 9:00 AM > To: ant-user@jakarta.apache.org > Subject: Re: How do I get the log file name? > > > http://jakarta.apache.org/ant/faq.html#mail-logger > > > ----- Original Message ----- > From: "O'Hara, Patrick" > To: "Ant User Mailing List (E-mail)" > Sent: Thursday, June 07, 2001 6:48 AM > Subject: How do I get the log file name? > > > > I want my build to mail the log file to a list of people. I have looked > at > > the mail command and I am wondering how I get the file name of the log > file? > > > > Patrick O'Hara > > Workscape, Inc > > N17 W24222 Riverwood Pl > > Waukesha, WI 53188-1162 > > 262-408-3849 > > 262-408-3840 Fax > > patrick.ohara@workscape.com > > <> > > >