You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kelly Davis <kd...@pobox.com> on 2004/10/13 16:18:48 UTC

setErrorPrintStream on DefaultLogger not working

I am using ant 1.6.2 doing a build through the api.
I am creating an instance of DefaultLogger. When I call 
setErrorPrintStream to a file for output, and then have a build with a 
compile error in it, the error output doesn't go to the file, but to my 
console. Any ideas on why this may be happening?

Kelly

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


Re: setErrorPrintStream on DefaultLogger not working

Posted by Laconia Data Systems <we...@laconiadatasystems.com>.
Kelly
I would strongly recommend implementing log4j to enable logging capabilities
for your application
To quote
"The target of the log output can be a file, an OutputStream, a
java.io.Writer, a remote log4j server, a remote Unix Syslog daemon, or even
a NT Event logger among many other output targets."
Take a look at
http://logging.apache.org/log4j/docs/ to get you started
HTH,
Martin
----- Original Message -----
From: "Kelly Davis" <kd...@pobox.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Thursday, October 14, 2004 11:31 AM
Subject: Re: setErrorPrintStream on DefaultLogger not working


> perhaps I should re-state the question a little bit.
>
> The problem that I am trying to solve is to be able to get compile
> errors to a log file. When I run a build script using the ant task, and
> set output= to a file, and the build script has compile errors, these
> errors do not show up in the file specified in output, though I see them
> on the console. The script will be running unattended using the api, so
> it is important to be able to send the build error output somewhere
> other than System.err. I would prefer this happen within the build
> script and not in my code, but if necessary I will use the api.
>
> Kelly Davis wrote:
>
> > I am using ant 1.6.2 doing a build through the api.
> > I am creating an instance of DefaultLogger. When I call
> > setErrorPrintStream to a file for output, and then have a build with a
> > compile error in it, the error output doesn't go to the file, but to
> > my console. Any ideas on why this may be happening?
> >
> > Kelly
>
>
>
>
> ---------------------------------------------------------------------
> 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


Re: setErrorPrintStream on DefaultLogger not working

Posted by Kelly Davis <kd...@pobox.com>.
perhaps I should re-state the question a little bit.

The problem that I am trying to solve is to be able to get compile 
errors to a log file. When I run a build script using the ant task, and 
set output= to a file, and the build script has compile errors, these 
errors do not show up in the file specified in output, though I see them 
on the console. The script will be running unattended using the api, so 
it is important to be able to send the build error output somewhere 
other than System.err. I would prefer this happen within the build 
script and not in my code, but if necessary I will use the api.

Kelly Davis wrote:

> I am using ant 1.6.2 doing a build through the api.
> I am creating an instance of DefaultLogger. When I call 
> setErrorPrintStream to a file for output, and then have a build with a 
> compile error in it, the error output doesn't go to the file, but to 
> my console. Any ideas on why this may be happening?
>
> Kelly




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