From 86029316faa68d77a37eab0a07714c5bd2dd46e1 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 4 Sep 2000 14:21:56 +0000 Subject: [PATCH] Use line.separator instead of hard coded \n. Submitted by: Nico Seessle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267955 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/DefaultLogger.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/DefaultLogger.java b/src/main/org/apache/tools/ant/DefaultLogger.java index c5e5242af..3da5f2d93 100644 --- a/src/main/org/apache/tools/ant/DefaultLogger.java +++ b/src/main/org/apache/tools/ant/DefaultLogger.java @@ -67,6 +67,8 @@ public class DefaultLogger implements BuildLogger { 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 @@ public class DefaultLogger implements BuildLogger { 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 @@ public class DefaultLogger implements BuildLogger { } } - 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() + ":"); } }