Browse Source

Use line.separator instead of hard coded \n.

Submitted by:	Nico Seessle <nico@seessle.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267955 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
86029316fa
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/main/org/apache/tools/ant/DefaultLogger.java

+ 6
- 4
src/main/org/apache/tools/ant/DefaultLogger.java View File

@@ -67,6 +67,8 @@ public class DefaultLogger implements BuildLogger {
private PrintStream out; private PrintStream out;
private int msgOutputLevel; private int msgOutputLevel;
private long startTime = System.currentTimeMillis(); private long startTime = System.currentTimeMillis();
private static String lSep = System.getProperty("line.separator");


private boolean emacsMode = false; private boolean emacsMode = false;


@@ -115,10 +117,10 @@ public class DefaultLogger implements BuildLogger {
Throwable error = event.getException(); Throwable error = event.getException();


if (error == null) { if (error == null) {
out.println("\nBUILD SUCCESSFUL");
out.println(lSep + "BUILD SUCCESSFUL");
} }
else { else {
out.println("\nBUILD FAILED\n");
out.println(lSep + "BUILD FAILED" + lSep);


if (error instanceof BuildException) { if (error instanceof BuildException) {
out.println(error.toString()); 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) { public void targetStarted(BuildEvent event) {
if (msgOutputLevel <= Project.MSG_INFO) { if (msgOutputLevel <= Project.MSG_INFO) {
out.println("\n" + event.getTarget().getName() + ":");
out.println(lSep + event.getTarget().getName() + ":");
} }
} }




Loading…
Cancel
Save