ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/listener MailLogger.java
Date Sat, 15 Dec 2001 17:59:13 GMT
sbailliez    01/12/15 09:59:13

  Modified:    src/main/org/apache/tools/ant DefaultLogger.java
                        NoBannerLogger.java
               src/main/org/apache/tools/ant/listener MailLogger.java
  Log:
  OK..First thanks to Sam for fixing this w/o complaining.
  It was probably not a very clever idea to remove the
  lSep since it is probably used by user-written loggers.
  
  To further shoot myself in the foot I noticed that
  I was compiling a different Ant repository than the
  in the one I was doing my changes...
  
  NB:If I continue this way I promise to stay away
  from code for a while and take some vacations.
  
  Revision  Changes    Path
  1.24      +3 -0      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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DefaultLogger.java	2001/12/15 00:32:32	1.23
  +++ DefaultLogger.java	2001/12/15 17:59:13	1.24
  @@ -73,6 +73,9 @@
       protected int msgOutputLevel = Project.MSG_ERR;
       private long startTime = System.currentTimeMillis();
   
  +    /** line separator */
  +    protected final static String lSep = StringUtils.LINE_SEP;
  +
       protected boolean emacsMode = false;
   
       /**
  
  
  
  1.4       +4 -4      jakarta-ant/src/main/org/apache/tools/ant/NoBannerLogger.java
  
  Index: NoBannerLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/NoBannerLogger.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NoBannerLogger.java	2001/12/15 03:41:06	1.3
  +++ NoBannerLogger.java	2001/12/15 17:59:13	1.4
  @@ -54,6 +54,8 @@
   
   package org.apache.tools.ant;
   
  +import org.apache.tools.ant.util.StringUtils;
  +
   /**
    * Extends DefaultLogger to strip out empty targets.
    *
  @@ -61,8 +63,6 @@
    */
   public class NoBannerLogger extends DefaultLogger {
   
  -    static private final String lSep = System.getProperty("line.separator");
  -
       protected String targetName;
   
       public void targetStarted(BuildEvent event) {
  @@ -76,13 +76,13 @@
       public void messageLogged(BuildEvent event) {
   
           if( event.getPriority() > msgOutputLevel ||
  -                null == event.getMessage() || 
  +                null == event.getMessage() ||
               "".equals( event.getMessage().trim() ) ) {
               return;
           }
   
           if( null != targetName ) {
  -            out.println(lSep + targetName + ":");
  +            out.println(StringUtils.LINE_SEP + targetName + ":");
               targetName = null;
           }
   
  
  
  
  1.4       +2 -3      jakarta-ant/src/main/org/apache/tools/ant/listener/MailLogger.java
  
  Index: MailLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/listener/MailLogger.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MailLogger.java	2001/12/15 03:41:06	1.3
  +++ MailLogger.java	2001/12/15 17:59:13	1.4
  @@ -66,6 +66,7 @@
   import org.apache.tools.ant.BuildEvent;
   import org.apache.tools.ant.DefaultLogger;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.util.StringUtils;
   import org.apache.tools.mail.MailMessage;
   
   /**
  @@ -102,8 +103,6 @@
   
     private StringBuffer buffer = new StringBuffer();
   
  -  static private final String lSep = System.getProperty("line.separator");
  -
     /**
      *  Sends an e-mail with the log results.
      *
  @@ -179,7 +178,7 @@
      *@param  message
      */
     protected void log(String message) {
  -    buffer.append(message + lSep);
  +    buffer.append(message + StringUtils.LINE_SEP);
     }
   
   
  
  
  

--
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