ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chad Loder <clo...@acm.org>
Subject a new logger: IndentedLogger
Date Sat, 04 May 2002 00:44:42 GMT
Hi. The output of DefaultLogger and NoBannerLogger are
hard to read and wasteful of space IMHO, so I created
a logging class which uses no blank lines between tasks,
instead using horizontal indentation according to the
"depth" of task being executed.

I'm quite happy with the results -- your mileage may
vary and I've only compiled and tested this under
Sun Win32 JDK's 1.2.2 and 1.3.1. See the attached
source file for details. I took the liberty of putting
the Apache software license at the top of the file, and
put it in the same package as the built-in loggers.

I'd be interested in any suggestions for improvements
and results on different platforms/JDKs.

Here's an example of the log output with the
IndentedLogger (please forgive any wrapping caused
by the mail software):

$ ant -logger org.apache.tools.ant.IndentedLogger

Buildfile: build.xml
setup-build-environment:
build:
   setup-build-environment:
   3rdparty:
     build:
        junit:
          build:
            init:
            versiontag:
                      [copy] Copying 1 file to E:\r7\src\3rdparty\junit\junit\junit\runner
                      [move] Moving 1 files to E:\r7\src\3rdparty\junit\junit\junit\runner
            build:
                     [javac] Compiling 86 source files to E:\r7\src\3rdparty\junit\junit
        log4j:
          build:
            init:
            build.core:
                    [mkdir] Created dir: E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes
                     [javac] Compiling 182 source files to E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes
                            [javac] Note: E:\r7\src\3rdparty\log4j\jakarta-log4j\src\java\org\apache\log4j\lf5\viewer\LogBrokerMonitor.java
uses or overrides a deprecated API.
                            [javac] Note: Recompile with -deprecation for details.
            build.examples:
                     [javac] Compiling 12 source files to E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes
                    [rmic] RMI Compiling 1 class to E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes
            jaxpCheck:
            jaxp:
                    [echo] JAXP present.
            build.xml:
                     [javac] Compiling 4 source files to E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes
                            [javac] Note: E:\r7\src\3rdparty\log4j\jakarta-log4j\src\java\org\apache\log4j\xml\test\DOMTest.java
uses or overrides a deprecated API.
                            [javac] Note: Recompile with -deprecation for details.
                      [copy] Copying 1 file to E:\r7\src\3rdparty\log4j\jakarta-log4j\dist\classes\org\apache\log4j\xml
            javamailCheck:
            javamail:
            build.javamail:
            jmsCheck:
            jms:
            jndiCheck:
            jndi:
                    [echo] JNDI is present.
            build.jms:
            jmxCheck:
            jmx:
            build.jmx:
            build:
        httpclient:
          build:
            init:
                    [echo] -------- HTTP Client Library 2.0-alpha1-dev --------
            prepare:
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\classes
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\conf
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\docs
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\docs\api
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\tests
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\httpclienttest
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\httpclienttest\WEB-INF
                    [mkdir] Created dir: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\httpclienttest\WEB-INF\
classes
            static:
                      [copy] Copying 1 file to E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\conf
            compile:
                     [javac] Compiling 40 source files to E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\classes
                            [javac] Note: E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\src\java\org\apache\commons\httpclient\log\Log4JCategoryLog.java
uses or overrides a deprecated API.
                            [javac] Note: Recompile with -deprecation for details.
                      [copy] Copying 3 files to E:\r7\src\3rdparty\httpclient\jakarta-commons\httpclient\target\classes
        jtidy:
          build:
            init:
            compile:
                    [mkdir] Created dir: E:\r7\src\3rdparty\jtidy\jtidy\build
                     [javac] Compiling 80 source files to E:\r7\src\3rdparty\jtidy\jtidy\build
        xerces:
          build:
            init:
                    [echo] ---------------- Xerces-J 1.4.4 [1999-2001] ---------------
            prepare:
                    [mkdir] Created dir: E:\r7\src\3rdparty\xerces\xml-xerces\java\build
            prepare-src:
                    [mkdir] Created dir: E:\r7\src\3rdparty\xerces\xml-xerces\java\build\src
                    [mkdir] Created dir: E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes
                    [mkdir] Created dir: E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes\META-INF
                    [mkdir] Created dir: E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes\META-INF\services
                      [copy] Copying 1 file to E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes\META-INF\services
                      [copy] Copying 1 file to E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes\META-INF\services
                      [copy] Copying 522 files to E:\r7\src\3rdparty\xerces\xml-xerces\java\build\src
            compile:
                      [copy] Copying 4 files to E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes
                     [javac] Compiling 474 source files to E:\r7\src\3rdparty\xerces\xml-xerces\java\build\classes
        all-projects:
   css-inject:
     build:
             [mkdir] Created dir: E:\r7\src\css-inject\_DEBUG\build\classes
             [javac] Compiling 1 source file to E:\r7\src\css-inject\_DEBUG\build\classes
   all-projects:

BUILD SUCCESSFUL
Total time: 49 seconds

Mime
View raw message