ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpfoe...@ThoughtWorks.com
Subject Re: [PATCH] logging cleanup
Date Sun, 02 Jul 2000 19:58:51 GMT
This version handles parse errors more gracefully...

Matt Foemmel
ThoughtWorks, Inc.

(See attached file: patch.jar)

----- Forwarded by Matthew P Foemmel/Corporate/ThoughtWorks/US on
07/02/2000 05:21 AM -----
                                                                                         
                           
                    mpfoemme@Though                                                      
                           
                    tWorks.com             To:     ant-dev@jakarta.apache.org            
                           
                                           cc:                                           
                           
                    07/01/2000             Subject:     [PATCH] logging cleanup          
                           
                    08:47 PM                                                             
                           
                    Please respond                                                       
                           
                    to ant-dev                                                           
                           
                                                                                         
                           
                                                                                         
                           




(See attached file: patch.jar)

Here's a patch that cleans up some of the output generated by Ant. I've
made the following changes:
     * Moved the rest of the "System.out.println" code in Main.java over to
DefaultLogger.java.
     * Cleaned up the default output to be a little more readable, by
putting blank lines between targets and aligning the message part of each
log statement.
     * Added a System.exit() call in main() to avoid dumping a stack trace
for every single error. Other tools that want to invoke Ant without exiting
can still call new Main(args).runBuild().
     * Changed the Javac task back to logging each line as it's generated.
I've created a generic TaskOutputStream to replace JavacOutputStream, which
is designed to be usable in any task.

Here's how the new output looks when building ant itself. Let me know if
you think it's an improvement or not...

D:\jakarta-ant>build clean main
Buildfile: build.xml

clean:
  [Deltree] Deleting: D:\build\ant
  [Deltree] Deleting: D:\dist\ant

prepare:
    [Mkdir] Created dir: D:\build\ant

check_for_optional_packages:

compile:
    [Mkdir] Created dir: D:\build\ant\classes
    [Javac] Compiling 65 source files to D:\build\ant\classes
  [Copydir] Copying 2 files to D:\build\ant\classes
  [Copydir] Copying 1 files to D:\build\ant\classes

jar:
      [Jar] Building jar: D:\jakarta-ant\lib\ant.jar

main:

BUILD SUCCESSFUL

Total time: 18 seconds


Mime
View raw message