+ trace(message, 1);
+ }
+
+ /**
+ * A trace happened, show it.
+ * <p>
+ * By default, will only be effective if {@link TraceHandler#traceLevel} is
+ * not 0 and the level is lower or equal to it.
+ *
+ * @param message
+ * the trace message
+ * @param level
+ * the trace level
+ */
+ public void trace(String message, int level) {
+ if (traceLevel > 0 && level <= traceLevel) {
+ if (maxPrintSize > 0 && message.length() > maxPrintSize) {
+ System.err
+ .println(message.substring(0, maxPrintSize) + "[...]");
+ } else {
+ System.err.println(message);
+ }