public String getDump () { if (this instanceof Loggeable) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream p = new PrintStream(baos); ((Loggeable)this).dump(p, ""); return baos.toString(); } return toString(); } protected void initService() throws Exception {}
public void printLoggeable(Loggeable l, String indent) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); l.dump (new PrintStream(baos), indent); println (baos.toString()); }
public void dump(PrintStream p, String indent, boolean detail) { String inner = indent + " "; p.println(indent + "name-registrar:"); for (String key : sp.getKeySet()) { Object obj = sp.rdp(key); String objectClassName = obj == null ? "<NULL>" : obj.getClass().getName(); p.println(inner + key + ": " + objectClassName); if (detail && obj instanceof Loggeable) { ((Loggeable) obj).dump(p, inner + " "); } } } }
for (Object o : cl) { if (o instanceof Loggeable) ((Loggeable) o).dump(p, inner); else p.println(inner + o);
public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<bl-exception>"); p.println (inner + "<message>" + getMessage() + "</message>"); if (detail != null) p.println (inner + "<detail>" + detail + "</detail>"); if (nested != null) { if (nested instanceof Loggeable) ((Loggeable)nested).dump (p, inner); else { p.println (inner + "<nested-exception>"); p.print (inner); nested.printStackTrace (p); p.println (inner + "</nested-exception>"); } } p.print (inner); printStackTrace (p); p.println (indent + "</bl-exception>"); } public String toString() {
public void dump (PrintStream p, String indent) { String inner = indent + " "; p.println (indent + "<" + getTagName() + ">"); p.println (inner + "<action>" + action + "</action>"); getCardHolder().dump (p, inner); p.println (inner + "<amount>" + amount + "</amount>"); p.println (inner + "<currency>" + currency + "</currency>"); p.println (inner + "<terminal>" + terminal + "</terminal>"); p.println (inner + "<purchasePlan>"+ purchasePlan + "</purchasePlan>"); p.println (inner + "<numberOfPayments>" + numberOfPayments + "</numberOfPayments>" ); if (response != null && response instanceof Loggeable) ((Loggeable)response).dump (p, inner); p.println (indent + "</" + getTagName() + ">"); } protected String getTagName() {
if (value instanceof Loggeable) { p.println(""); ((Loggeable) value).dump(p, indent + " "); p.print(indent); } else if (value instanceof Element) {
((Loggeable) header).dump (p, newIndent);
for (Object o : payLoad) { if (o instanceof Loggeable) ((Loggeable) o).dump(p, newIndent); else if (o instanceof SQLException) { SQLException e = (SQLException) o;