ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cantrell David M SSgt AFRS/RSIDS <David.Cantr...@rs.af.mil>
Subject RE: Logging to console and a file
Date Tue, 06 Jan 2004 16:14:38 GMT
Move it to the <project> level. I just tried this:

	<project name="Ant" default="main" basedir=".">
		<tstamp>
			<format property="TIMESTAMP"
pattern="yyyyMMddHHmmss"/>
		</tstamp>
		<record name="debug.${TIMESTAMP}.txt" loglevel="verbose"
append="no" action="start"/>
		... rest of Ant build file ...
	</project>

Then I just ran Ant on the default target "main" and it worked perfectly.

-dave

-----Original Message-----
From: Roman Rytov [mailto:rrytov@entopia.com]
Sent: Tuesday, January 06, 2004 9:18 AM
To: Ant Users List
Subject: RE: Logging to console and a file


The point not to print a specific target but to affect on the whole
logging of a script. On a level of script but target.



Roman 

> -----Original Message-----
> From: Jake Ewerdt [mailto:jake@emeta.com] 
> Sent: Tuesday, January 06, 2004 16:41
> To: Ant Users List
> Subject: Re: Logging to console and a file
> 
> I use the record tag.  Just put this at the top of your 
> target and it should log everything.
> 
> <tstamp><format property="TIMESTAMP" pattern="yyyyMMddHHmmss" 
> /></tstamp> <record name="/tmp/debug.${TIMESTAMP}" 
> loglevel="info" append="no" action="start"/>
> 
> You can change info to warn or error to log less or verbose 
> or debug to log more.
> 
> -jake
> 
> 
> On Tuesday 06 January 2004 09:00 am, Wascally Wabbit wrote:
> > At 07:27 AM 1/6/2004, you wrote:
> > >Is there a way to redirect a console logger to a file and 
> at the same 
> > >time leave it on conlose output? Can two loggers be added?
> > >
> > >Roman
> >
> > I have not verified this but... you could try the 
> <capturelogs> and/or 
> > <capture-stdio> task in AntXtras package. FYI:
> >
> > <target name="Whatever">
> >     <capturelogs importantfrom="info">
> >
> >         [bla bla bla]
> >
> >         <copylogged tofile="${mylogs}/captured.logs"/>
> >     </capturelogs>
> > </target>
> >
> > You can also capture stdio by substituting <capture-stdio> for 
> > <capturelogs> and setting the "from" attribute of the <copylogged> 
> > task to "stdio" (otherwise it defaults to "antlogs".
> >
> >
> > The Wabbit
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message