From: Niki Roo Date: Sat, 13 Apr 2019 10:34:25 +0000 (+0200) Subject: tracer: traces on stderr X-Git-Tag: fanfix-swing-0.0.1~21^2~167 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=e361afe469e252cb4f04f64ec8baf5c27d4b9917;p=fanfix-swing.git tracer: traces on stderr --- diff --git a/changelog.md b/changelog.md index 2472a7f1..ccee007e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # nikiroo-utils +## Version WIP + +- tracer: traces on stderr by default + ## Version 4.6.2 - fix: formatNumber/toNumber and decimals diff --git a/src/be/nikiroo/utils/TraceHandler.java b/src/be/nikiroo/utils/TraceHandler.java index be9beeff..12ae849b 100644 --- a/src/be/nikiroo/utils/TraceHandler.java +++ b/src/be/nikiroo/utils/TraceHandler.java @@ -28,7 +28,7 @@ public class TraceHandler { * @param showErrorDetails * show more details when printing errors * @param showTraces - * show level 1 traces on stdout, or no traces at all + * show level 1 traces on stderr, or no traces at all */ public TraceHandler(boolean showErrors, boolean showErrorDetails, boolean showTraces) { @@ -140,10 +140,10 @@ public class TraceHandler { public void trace(String message, int level) { if (traceLevel > 0 && level <= traceLevel) { if (maxPrintSize > 0 && message.length() > maxPrintSize) { - System.out + System.err .println(message.substring(0, maxPrintSize) + "[...]"); } else { - System.out.println(message); + System.err.println(message); } } }