ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/listener AnsiColorLogger.java Log4jListener.java
Date Tue, 09 Apr 2002 14:19:32 GMT
conor       02/04/09 07:19:32

  Modified:    .        check.xml
               src/main/org/apache/tools/ant DefaultLogger.java
               src/main/org/apache/tools/ant/listener AnsiColorLogger.java
                        Log4jListener.java
  Log:
  Javadoc and style updates
  
  Revision  Changes    Path
  1.2       +2 -1      jakarta-ant/check.xml
  
  Index: check.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/check.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -u -r1.1 -r1.2
  --- check.xml	9 Apr 2002 11:51:02 -0000	1.1
  +++ check.xml	9 Apr 2002 14:19:32 -0000	1.2
  @@ -6,7 +6,8 @@
       <taskdef name="checkstyle"
                classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"/>
       <checkstyle headerFile="src/etc/RequiredHeader.txt"
  -                headerIgnoreLine="4">
  +                headerIgnoreLine="4"
  +                allowProtected="true">
         <fileset dir="${java.dir}">
           <include name="${tocheck}"/>
         </fileset>
  
  
  
  1.35      +10 -11    jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java
  
  Index: DefaultLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -w -u -r1.34 -r1.35
  --- DefaultLogger.java	6 Mar 2002 08:31:42 -0000	1.34
  +++ DefaultLogger.java	9 Apr 2002 14:19:32 -0000	1.35
  @@ -83,7 +83,7 @@
       private long startTime = System.currentTimeMillis();
   
       /** Line separator */
  -    protected final static String lSep = StringUtils.LINE_SEP;
  +    protected static final String lSep = StringUtils.LINE_SEP;
       
       /** Whether or not to use emacs-style output */
       protected boolean emacsMode = false;
  @@ -168,8 +168,7 @@
           if (error == null) {
               message.append(StringUtils.LINE_SEP);
               message.append("BUILD SUCCESSFUL");
  -        }
  -        else {
  +        } else {
               message.append(StringUtils.LINE_SEP);
               message.append("BUILD FAILED");
               message.append(StringUtils.LINE_SEP);
  @@ -177,13 +176,11 @@
               if (Project.MSG_VERBOSE <= msgOutputLevel ||
                   !(error instanceof BuildException)) {
                   message.append(StringUtils.getStackTrace(error));
  -            }
  -            else {
  +            } else {
                   if (error instanceof BuildException) {
  -                    message.append(error.toString()).append(StringUtils.LINE_SEP);
  -                }
  -                else {
  -                    message.append(error.getMessage()).append(StringUtils.LINE_SEP);
  +                    message.append(error.toString()).append(lSep);
  +                } else {
  +                    message.append(error.getMessage()).append(lSep);
                   }
               }
           }
  @@ -209,7 +206,8 @@
         */
       public void targetStarted(BuildEvent event) {
           if (Project.MSG_INFO <= msgOutputLevel) {
  -            String msg = StringUtils.LINE_SEP + event.getTarget().getName() + ":";
  +            String msg = StringUtils.LINE_SEP 
  +                + event.getTarget().getName() + ":";
               printMessage(msg, out, event.getPriority());
               log(msg);
           }
  @@ -256,7 +254,8 @@
   
                   if (!emacsMode) {
                       String label = "[" + name + "] ";
  -                    for (int i = 0; i < (LEFT_COLUMN_SIZE - label.length()); i++) {
  +                    int size = LEFT_COLUMN_SIZE - label.length();
  +                    for (int i = 0; i < size; i++) {
                           message.append(" ");
                       }
                       message.append(label);
  
  
  
  1.3       +66 -55    jakarta-ant/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java
  
  Index: AnsiColorLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -u -r1.2 -r1.3
  --- AnsiColorLogger.java	15 Mar 2002 01:15:25 -0000	1.2
  +++ AnsiColorLogger.java	9 Apr 2002 14:19:32 -0000	1.3
  @@ -135,7 +135,6 @@
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
    */
   public final class AnsiColorLogger extends DefaultLogger {
  -
       private static final int ATTR_NORMAL = 0;
       private static final int ATTR_BRIGHT = 1;
       private static final int ATTR_DIM = 2;
  @@ -167,14 +166,23 @@
       private static final char SEPARATOR = ';';
       private static final String END_COLOR = PREFIX + SUFFIX;
   
  -    private String errColor = PREFIX + ATTR_DIM + SEPARATOR + FG_RED + SUFFIX;
  -    private String warnColor = PREFIX + ATTR_DIM + SEPARATOR + FG_MAGENTA + SUFFIX;
  -    private String infoColor = PREFIX + ATTR_DIM + SEPARATOR + FG_CYAN + SUFFIX;
  -    private String verboseColor = PREFIX + ATTR_DIM + SEPARATOR + FG_GREEN + SUFFIX;
  -    private String debugColor = PREFIX + ATTR_DIM + SEPARATOR + FG_BLUE + SUFFIX;
  +    private String errColor 
  +        = PREFIX + ATTR_DIM + SEPARATOR + FG_RED + SUFFIX;
  +    private String warnColor 
  +        = PREFIX + ATTR_DIM + SEPARATOR + FG_MAGENTA + SUFFIX;
  +    private String infoColor 
  +        = PREFIX + ATTR_DIM + SEPARATOR + FG_CYAN + SUFFIX;
  +    private String verboseColor 
  +        = PREFIX + ATTR_DIM + SEPARATOR + FG_GREEN + SUFFIX;
  +    private String debugColor 
  +        = PREFIX + ATTR_DIM + SEPARATOR + FG_BLUE + SUFFIX;
   
       private boolean colorsSet = false;
   
  +    /**
  +     * Set the colors to use from a property file specified by the
  +     * special ant property ant.logger.defaults
  +     */
       private final void setColors() {
           String userColorFile = System.getProperty("ant.logger.defaults");
           String systemColorFile =
  @@ -228,6 +236,9 @@
           }
       }
   
  +    /**
  +     * @see DefaultLogger#printMessage
  +     */
       protected final void printMessage(final String message,
                                         final PrintStream stream,
                                         final int priority) {
  
  
  
  1.9       +7 -7      jakarta-ant/src/main/org/apache/tools/ant/listener/Log4jListener.java
  
  Index: Log4jListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/listener/Log4jListener.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -u -r1.8 -r1.9
  --- Log4jListener.java	9 Apr 2002 06:18:35 -0000	1.8
  +++ Log4jListener.java	9 Apr 2002 14:19:32 -0000	1.9
  @@ -90,7 +90,7 @@
       }
   
       /**
  -     * @see BuildListener@buildStarted.
  +     * @see BuildListener#buildStarted
        */
       public void buildStarted(BuildEvent event) {
           if (initialized) {
  @@ -100,7 +100,7 @@
       }
   
       /**
  -     * @see BuildListener@buildFinished.
  +     * @see BuildListener#buildFinished
        */
       public void buildFinished(BuildEvent event) {
           if (initialized) {
  @@ -114,7 +114,7 @@
       }
   
       /**
  -     * @see BuildListener@targetStarted.
  +     * @see BuildListener#targetStarted
        */
       public void targetStarted(BuildEvent event) {
           if (initialized) {
  @@ -124,7 +124,7 @@
       }
   
       /**
  -     * @see BuildListener@targetFinished.
  +     * @see BuildListener#targetFinished
        */
       public void targetFinished(BuildEvent event) {
           if (initialized) {
  @@ -140,7 +140,7 @@
       }
   
       /**
  -     * @see BuildListener@taskStarted.
  +     * @see BuildListener#taskStarted
        */
       public void taskStarted(BuildEvent event) {
           if (initialized) {
  @@ -151,7 +151,7 @@
       }
   
       /**
  -     * @see BuildListener@taskFinished.
  +     * @see BuildListener#taskFinished
        */
       public void taskFinished(BuildEvent event) {
           if (initialized) {
  @@ -167,7 +167,7 @@
       }
   
       /**
  -     * @see BuildListener@messageLogged.
  +     * @see BuildListener#messageLogged
        */
       public void messageLogged(BuildEvent event) {
           if (initialized) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message