tracer: traces on stderr
authorNiki Roo <niki@nikiroo.be>
Sat, 13 Apr 2019 10:34:25 +0000 (12:34 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 13 Apr 2019 10:34:25 +0000 (12:34 +0200)
changelog.md
src/be/nikiroo/utils/TraceHandler.java

index 2472a7f150aaba8454699724bc5a69fdb1bb280b..ccee007e571484f92f39b8d6f0e545b94ab23626 100644 (file)
@@ -1,5 +1,9 @@
 # nikiroo-utils
 
+## Version WIP
+
+- tracer: traces on stderr by default
+
 ## Version 4.6.2
 
 - fix: formatNumber/toNumber and decimals
index be9beeffd780af92c80f7ea16d389723b863419b..12ae849b0d267e56d2971937b87b5c0765de73c6 100644 (file)
@@ -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);
                        }
                }
        }