/** * @see #specification(ObjectAdapter, DebugBuilder) * @see #specification(ObjectSpecification, DebugBuilder) */ public static String specification(final ObjectAdapter adapter) { final DebugBuilder debugBuilder = new DebugString(); specification(adapter, debugBuilder); return debugBuilder.toString(); }
/** * @see #adapter(ObjectAdapter, DebugBuilder) */ public static String adapter(final ObjectAdapter adapter) { final DebugBuilder debugBuilder = new DebugString(); adapter(adapter, debugBuilder); return debugBuilder.toString(); }
/** * Creates an ascii object graph diagram for the specified object, up to * three levels deep. * * @see #graph(ObjectAdapter, AuthenticationSession, DebugBuilder) */ public static String graph(final ObjectAdapter adapter, final AuthenticationSession authenticationSession) { debugBuilder = new DebugString(); graph(adapter, authenticationSession, debugBuilder); return debugBuilder.toString(); }
@Override public String debug() { final DebugString debug = new DebugString(); memento.debug(debug); return debug.toString(); }
public String debugServices() { final DebugString debug = new DebugString(); final List<Object> services = getServices(); for (final Object service : services) { debug.append(service.getClass().getName()); debug.append("\n"); } return debug.toString().replaceAll("\n", "<br>"); }
public String debugObjectStore() { final ObjectStorePersistence objectStore = getObjectStore(); final DebugString debug = new DebugString(); objectStore.debugData(debug); return debug.toString().replaceAll("\n", "<br>"); }
@Override public String debugData() { final DebugString debugString = new DebugString(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
public void writeTextPage(final String section, final PrintWriter writer) throws IOException { Assert.assertNotNull(section); Assert.assertNotNull(writer); final String sectionName = section.equals("") ? "Overview" : section; writer.println(sectionName); final DebuggableWithTitle[] infos = IsisContext.debugSystem(); if (sectionName.equals("Events")) { int i = 1; for (final MonitorEvent event : requests) { writer.println(i++ + ". " + event); } // TODO add clause for request } else { for (final DebuggableWithTitle info : infos) { if (info.debugTitle().equals(sectionName)) { final DebugString debug = new DebugString(); info.debugData(debug); writer.println(debug.toString()); } } } writer.print("[Options: "); // final String[] options = target.debugSectionNames(); for (final DebuggableWithTitle info : infos) { writer.print(info.debugTitle() + " "); } // writer.println(); } /*
public void testEmpty() throws Exception { store.debugTitle(); final DebugBuilder debug = new DebugString(); store.debugData(debug); } }
@Override public String debugData() { final DebugString debugString = new DebugString(); debugString.indent(); debugString.indent(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
@Override public String debugData() { final DebugString debugString = new DebugString(); debugString.indent(); debugString.indent(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
protected void objectGraph(final Request request) { final String id = request.getOptionalProperty(VALUE); final ObjectAdapter object = request.getContext().getMappedObjectOrResult(id); request.appendHtml("<h1>Object Graph - " + object + "</h1>"); request.appendHtml("<pre>"); final DebugBuilder debug = new DebugString(); Dump.graph(object, null, debug); request.appendHtml(debug.toString()); request.appendHtml("</pre>"); }
final DebugBuilder debug = new DebugString(); connectionPool.debug(debug); LOG.info("Database: " + debug);
private void system(final RequestContext context, final DebugWriter view) { final DebuggableWithTitle[] debug = IsisContext.debugSystem(); view.appendTitle("System"); for (final DebuggableWithTitle element2 : debug) { final DebugString str = new DebugString(); element2.debugData(str); view.appendTitle(element2.debugTitle()); view.appendln("<pre class=\"debug\">" + str + "</pre>"); } }
public MonitorEvent(final String category, final String message, final DebuggableWithTitle[] debugDetails) { this.message = message; this.category = category; debug = new DebugString(); try { if (debugDetails != null) { for (final DebuggableWithTitle info : debugDetails) { debug.appendTitle(info.debugTitle()); debug.indent(); info.debugData(debug); debug.unindent(); } } } catch (final RuntimeException e) { debug.appendException(e); } }
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); }
protected void specificationGraph(final Request request) { final String name = request.getOptionalProperty(VALUE); final ObjectSpecification spec = getSpecificationLoader().loadSpecification(name); request.appendHtml("<h1>Specification Graph - " + spec.getFullIdentifier() + "</h1>"); request.appendHtml("<p><a href=\"./debug.shtml?type=specification&value=" + spec.getFullIdentifier() + "\">Full Specification</a></p>"); request.appendHtml("<pre>"); final DebugBuilder debug = new DebugString(); debug.appendln(spec.getFullIdentifier()); debug.indent(); specificationGraph(spec, debug, new ArrayList<ObjectSpecification>()); debug.unindent(); request.appendHtml(debug.toString()); request.appendHtml("</pre>"); }
public void testObject() throws Exception { final ObjectAdapter object = system.createPersistentTestObject(); final CreateObjectCommand command = store.createCreateObjectCommand(object); store.execute(Collections.<PersistenceCommand> singletonList(command)); store.debugTitle(); final DebugBuilder debug = new DebugString(); store.debugData(debug); }
private void object(final RequestContext context, final DebugWriter view) { final ObjectAdapter object = context.getMappedObjectOrResult(context.getParameter("object")); final DebugString str = new DebugString(); Dump.adapter(object, str); Dump.graph(object, IsisContext.getAuthenticationSession(), str); view.appendTitle(object.getSpecification().getFullIdentifier()); view.appendln("<pre class=\"debug\">" + str + "</pre>"); }
@Test public void debug() throws Exception { final DebugString debug = new DebugString(); options.debugData(debug); assertNotNull(debug.toString()); }