ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <erikhatc...@earthlink.net>
Subject Re: How do I get the log file name?
Date Thu, 07 Jun 2001 17:10:08 GMT
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" <patrick.ohara@workscape.com>
To: <ant-user@jakarta.apache.org>
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.
>
>   <!--
>        ===================================================================
>                               Send mail out with results
>        ===================================================================
>        note that ${BuildResult} and the do-mail property must have been
set!
>   -->
>   <target name="SendMail" if="do-mail" description="Sends mail with build
> results if do-mail proerty is set. Used by automatic build.">
> <mail from="TahoeBuild@lgc.com"
>           tolist="${MailtoList}"
>           subject="Results of Tahoe nightly build ${label}
(${BuildResult})"
>           files="BuildMail.log"
>           mailhost="mailhost" />
>   </target>
>
>
>
>
>
>
> -----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" <patrick.ohara@workscape.com>
> To: "Ant User Mailing List (E-mail)" <ant-user@jakarta.apache.org>
> 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
> >  <<O'Hara, Patrick.vcf>>
> >
>


Mime
View raw message