You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Juan Jose Pablos <jj...@bton.ac.uk> on 2000/06/15 02:38:18 UTC
proposal:redirect the output to a file?
Hi there,
I am using Ant inside windows, and one thing I thought that could be nice is
that you could specify the output of what happened into a file.
something like:
FileOutputStream file;
try {
file = new FileOutputStream("projectOutput.dat");
}
catch (IOException e) {
blablabla
}
System.setOut(new PrintStream(file,true));
It it Just a Thought not very dificult to implement.( I think)
Juan
Re: proposal:redirect the output to a file?
Posted by Juan Jose Pablos <jj...@bton.ac.uk>.
ok, but can you specify this on a build file?
----- Original Message -----
From: "Conor MacNeill" <co...@cortexebusiness.com.au>
To: <an...@jakarta.apache.org>
Sent: Thursday, June 15, 2000 1:47 AM
Subject: RE: proposal:redirect the output to a file?
> Juan,
>
> This is provided by the -logfile option.
>
> F:\work\projects\commerce_framework\ant>ant -help
> ant [options] [target]
> Options:
> -help print this message
> -quiet be extra quiet
> -verbose be extra verbose
> -logfile <file> use given file for log
> -buildfile <file> use given buildfile
> -D<property>=<value> use value for given property
>
> --
> Conor MacNeill
> conor@cortexebusiness.com.au
> Cortex eBusiness
> http://www.cortexebusiness.com.au
>
> > -----Original Message-----
> > From: Juan Jose Pablos [mailto:jjp3@bton.ac.uk]
> > Sent: Thursday, 15 June 2000 10:38
> > To: ant-dev@jakarta.apache.org
> > Subject: proposal:redirect the output to a file?
> >
> >
> > Hi there,
> > I am using Ant inside windows, and one thing I thought that could
> > be nice is
> > that you could specify the output of what happened into a file.
> >
> > something like:
> >
> > FileOutputStream file;
> >
> > try {
> >
> > file = new FileOutputStream("projectOutput.dat");
> > }
> > catch (IOException e) {
> > blablabla
> > }
> >
> > System.setOut(new PrintStream(file,true));
> >
> >
> > It it Just a Thought not very dificult to implement.( I think)
> >
> >
> > Juan
> >
> >
> >
>
RE: proposal:redirect the output to a file?
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Juan,
This is provided by the -logfile option.
F:\work\projects\commerce_framework\ant>ant -help
ant [options] [target]
Options:
-help print this message
-quiet be extra quiet
-verbose be extra verbose
-logfile <file> use given file for log
-buildfile <file> use given buildfile
-D<property>=<value> use value for given property
--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au
> -----Original Message-----
> From: Juan Jose Pablos [mailto:jjp3@bton.ac.uk]
> Sent: Thursday, 15 June 2000 10:38
> To: ant-dev@jakarta.apache.org
> Subject: proposal:redirect the output to a file?
>
>
> Hi there,
> I am using Ant inside windows, and one thing I thought that could
> be nice is
> that you could specify the output of what happened into a file.
>
> something like:
>
> FileOutputStream file;
>
> try {
>
> file = new FileOutputStream("projectOutput.dat");
> }
> catch (IOException e) {
> blablabla
> }
>
> System.setOut(new PrintStream(file,true));
>
>
> It it Just a Thought not very dificult to implement.( I think)
>
>
> Juan
>
>
>
Re: proposal:redirect the output to a file?
Posted by Peter Donald <do...@mad.scientist.com>.
At 02:36 15/6/00 +0100, you wrote:
>Peter,
>
>I tried that, but I was thinking about include everything on the build file,
>and possibly thinking about adding the timestamp on the name of the log file
>using <tstamp/>
ahh I see ... thank god most of my time is spent on *nix platforms where
this hackery is but a single line of shell script :P
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*
Re: proposal:redirect the output to a file?
Posted by Juan Jose Pablos <jj...@bton.ac.uk>.
Peter,
I tried that, but I was thinking about include everything on the build file,
and possibly thinking about adding the timestamp on the name of the log file
using <tstamp/>
Juan
----- Original Message -----
From: "Peter Donald" <do...@mad.scientist.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, June 15, 2000 1:55 AM
Subject: Re: proposal:redirect the output to a file?
> At 01:38 15/6/00 +0100, you wrote:
> >Hi there,
> >I am using Ant inside windows, and one thing I thought that could be nice
is
> >that you could specify the output of what happened into a file.
>
> or alternatively you could type build.bat > output.log which is prolly a
> better answer. The only thing I could see where it may be advantage to
have
> log file writing in ant would be when functionality like unix tee isn't
> available. ie you cant both record a log and write to a file
simultaneously
>
>
> Cheers,
>
> Pete
>
> *------------------------------------------------------*
> | "Nearly all men can stand adversity, but if you want |
> | to test a man's character, give him power." |
> | -Abraham Lincoln |
> *------------------------------------------------------*
>
Re: proposal:redirect the output to a file?
Posted by Peter Donald <do...@mad.scientist.com>.
At 01:38 15/6/00 +0100, you wrote:
>Hi there,
>I am using Ant inside windows, and one thing I thought that could be nice is
>that you could specify the output of what happened into a file.
or alternatively you could type build.bat > output.log which is prolly a
better answer. The only thing I could see where it may be advantage to have
log file writing in ant would be when functionality like unix tee isn't
available. ie you cant both record a log and write to a file simultaneously
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*