ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant DefaultLogger.java
Date Mon, 04 Sep 2000 14:21:56 GMT
bodewig     00/09/04 07:21:56

  Modified:    src/main/org/apache/tools/ant DefaultLogger.java
  Log:
  Use line.separator instead of hard coded \n.
  Submitted by:	Nico Seessle <nico@seessle.de>
  
  Revision  Changes    Path
  1.6       +6 -4      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultLogger.java	2000/07/25 13:15:29	1.5
  +++ DefaultLogger.java	2000/09/04 14:21:56	1.6
  @@ -67,6 +67,8 @@
       private PrintStream out;
       private int msgOutputLevel;
       private long startTime = System.currentTimeMillis();
  +	
  +    private static String lSep = System.getProperty("line.separator");
   
       private boolean emacsMode = false;
   
  @@ -115,10 +117,10 @@
           Throwable error = event.getException();
   
           if (error == null) {
  -            out.println("\nBUILD SUCCESSFUL");
  +            out.println(lSep + "BUILD SUCCESSFUL");
           }
           else {
  -            out.println("\nBUILD FAILED\n");
  +            out.println(lSep + "BUILD FAILED" + lSep);
   
               if (error instanceof BuildException) {
                   out.println(error.toString());
  @@ -133,12 +135,12 @@
               }
           }
   
  -        out.println("\nTotal time: " + formatTime(System.currentTimeMillis() - startTime));
  +        out.println(lSep + "Total time: " + formatTime(System.currentTimeMillis() - startTime));
       }
   
       public void targetStarted(BuildEvent event) {
           if (msgOutputLevel <= Project.MSG_INFO) {
  -            out.println("\n" + event.getTarget().getName() + ":");
  +            out.println(lSep + event.getTarget().getName() + ":");
           }
       }
   
  
  
  

Mime
View raw message