@Override public void appendPreformatted(final String label, final String text) { appendln(label, text); };
@Override public void appendPreformatted(final String text) { appendln(text); }
/** * Append the specified number, displayed in hexadecimal notation, with the * specified label, then start a new line. */ @Override public void appendAsHexln(final String label, final long value) { appendln(label, "#" + Long.toHexString(value)); }
/** * Append the specified number with the specified label, then start a new * line. */ @Override public void appendln(final String label, final double value) { appendln(label, String.valueOf(value)); }
/** * Append the specified value, displayed as true or false, with the * specified label, then start a new line. */ @Override public void appendln(final String label, final boolean value) { appendln(label, String.valueOf(value)); }
/** * Append the specified number, displayed in hexadecimal notation, with the * specified label, then start a new line. */ @Override public void appendln(final String label, final long value) { appendln(label, String.valueOf(value)); }
/** * Append the message and trace of the specified exception. */ @Override public void appendException(final Throwable e) { ByteArrayOutputStream baos; final PrintStream s = new PrintStream(baos = new ByteArrayOutputStream()); e.printStackTrace(s); appendln(e.getMessage()); appendln(new String(baos.toByteArray())); s.close(); }
@Override public void endSection() { appendln(); unindent(); }
/** * Append the elements of the specified array with the specified label. Each * element is appended on its own line, and a new line is added after the * last element. */ @Override public void appendln(final String label, final Object[] object) { if (object.length == 0) { appendln(label, "empty array"); } else { appendln(label, object[0]); for (int i = 1; i < object.length; i++) { string.append(spaces(COLUMN_SPACING + 2)); string.append(object[i]); string.append('\n'); } newLine = true; } }
public static void debug(final DebugString debug) { debug.appendTitle("Image Lookup"); debug.indent(); final Iterator keys = images.keySet().iterator(); while (keys.hasNext()) { final Object key = keys.next(); final Object value = images.get(key); debug.appendln(key + " -> " + value); } debug.unindent(); }
/** * Append the specified text, then start a new line. */ @Override public void appendln(final String text) { appendIndent(); append(text); appendln(); newLine = true; }
public void takeSnapshot() { if (!LOG.isDebugEnabled()) { return; } final DebugString debug = new DebugString(); debug(debug); debug.indent(); debug.appendln(); debug(debug, getPersistenceSession()); if (getCurrentTransaction() != null) { debug(debug, getCurrentTransaction().getUpdateNotifier()); debug(debug, getCurrentTransaction().getMessageBroker()); } debugSnapshot = debug.toString(); LOG.debug(debugSnapshot); }