ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Is there a way to dual output log to terminal AND file?
Date Thu, 01 Jul 2004 08:36:07 GMT
Just own grain of salt on this:

If you want a pure Ant solution, use either <record> now, or someone
develops a CompositeBuildLogger to dispatch messages to more than one build
logger.

The quickest on Unix and a Unix-like toolkit on Windows (Cygwin or other) is
to use 'tee' to save to file and send to stdout at the same time. This must
be enabled in the script that launches Ant though, rather than in Ant
itself. --DD

-----Original Message-----
From: Woodchuck
To: Ant Users List
Sent: 6/30/2004 9:09 AM
Subject: Re: Is there a way to dual output log to terminal AND file?

i'm in windows and i made a .CMD file that i double-click to run my ant
build process.  here is my .CMD file:

@setlocal
@set TOMCAT_HOME="C:\Apache Group\Tomcat 4.1"
@set ANT_HOME=C:\apache_ant_1.6.1
@set JAVA_HOME=C:\j2sdk1.4.1_02
@set path=%PATH%;%ANT_HOME%\bin

@call ant -l build.log -lib %ANT_HOME%\lib -lib
%TOMCAT_HOME%\common\lib 
@type build.log
@pause

my solution has nothing to do with Ant really, the @type will display
the log file *after* ant has finished building whether successful or
unsuccessful

the @pause will keep the DOS window from closing automatically

just another possibility :)


--- Andrew Craig <andrewsc@gmail.com> wrote:
> Use the <record> task.  At the top of your build file, put :
> 
> <record name="log.txt" action="start" />
> 
> The output still goes out to the terminal, but also goes through to
> the log.txt file.
> 
> On Tue, 29 Jun 2004 14:55:54 -0700, Chris Burbridge ( Temp )
> <chris.burbridge@autodesk.com> wrote:
> > 
> > Is there a way to have the logging output still go to the terminal,
> but also be saved to a file? (Preferably, something that I could
> specify from within the build file)?
> > 
> > Thanks!
> > 
> 
> 
> 
> 
> -- 
> Andrew
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
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


Mime
View raw message