logging: strip line ends from the error message if not printing stacktrace v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 06 Dec 2014 14:12:59 +0100
branchv_0
changeset 1824ff7a273f3e8
parent 181 80333d0ae763
child 183 1bb5abfb0655
logging: strip line ends from the error message if not printing stacktrace
java/sql-dk/src/info/globalcode/sql/dk/logging/ColorfulConsoleFormatter.java
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/logging/ColorfulConsoleFormatter.java	Mon Sep 29 10:34:54 2014 +0200
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/logging/ColorfulConsoleFormatter.java	Sat Dec 06 14:12:59 2014 +0100
     1.3 @@ -71,7 +71,11 @@
     1.4  			String message = t.getLocalizedMessage();
     1.5  			if (message != null) {
     1.6  				out.print(": ");
     1.7 -				out.print(message);
     1.8 +				if (printStacktrace) {
     1.9 +					out.print(message);
    1.10 +				} else {
    1.11 +					out.print(message.replaceAll("\\n", " "));
    1.12 +				}
    1.13  			}
    1.14  			if (printStacktrace) {
    1.15  				out.println();