ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1591973 - /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java
Date Fri, 02 May 2014 16:59:57 GMT
Author: bodewig
Date: Fri May  2 16:59:56 2014
New Revision: 1591973

URL: http://svn.apache.org/r1591973
Log:
dry things up a little

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java?rev=1591973&r1=1591972&r2=1591973&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/LogCapturer.java Fri May  2
16:59:56 2014
@@ -120,19 +120,23 @@ public class LogCapturer implements Buil
      */
     public void messageLogged(BuildEvent event) {
         if (event.getPriority() <= Project.MSG_ERR) {
-            err.append(event.getMessage()).append(StringUtils.LINE_SEP);
+            append(err, event);
         }
         if (event.getPriority() <= Project.MSG_WARN) {
-            warn.append(event.getMessage()).append(StringUtils.LINE_SEP);
+            append(warn, event);
         }
         if (event.getPriority() <= Project.MSG_INFO) {
-            info.append(event.getMessage()).append(StringUtils.LINE_SEP);
+            append(info, event);
         }
         if (event.getPriority() <= Project.MSG_VERBOSE) {
-            verbose.append(event.getMessage()).append(StringUtils.LINE_SEP);
+            append(verbose, event);
         }
         if (event.getPriority() <= Project.MSG_DEBUG) {
-            debug.append(event.getMessage()).append(StringUtils.LINE_SEP);
+            append(debug, event);
         }
     }
+
+    private static void append(StringBuffer sb, BuildEvent event) {
+        sb.append(event.getMessage()).append(StringUtils.LINE_SEP);
+    }
 }



Mime
View raw message