Log output to both the console and a logfile?
1 posts in topic
Flat View  Flat View

Posted By:   kenneth_Esmann
Posted On:   Tuesday, May 21, 2002 08:50 AM

I have set up ANT to output to a logfile, but I need to echo some progress messages to the console during the build.

Is there a way to do this? or alternately write the entire build log to both a log file and the console?

Re: Log output to both the console and a logfile?

Posted By:   Erik_Hatcher  
Posted On:   Friday, June 7, 2002 12:50 PM

There are a couple of good ways to do this:

  • Use the Log4jListener as a -listener switch and configure it to output to a log file. This will not be in the same format as the console output though.

  • Write a subclass of the DefaultLogger class that outputs to the console and a file. This would allow both to have the same output. You would use the -logger switch for this option.

About | Sitemap | Contact