/** * Print the thread information. * @param sb The StringBuilder. */ @Override public void printThreadInfo(final StringBuilder sb) { StringBuilders.appendDqValue(sb, name).append(Chars.SPACE); if (isDaemon) { sb.append("daemon "); } sb.append("prio=").append(priority).append(" tid=").append(id).append(' '); if (threadGroupName != null) { StringBuilders.appendKeyDqValue(sb, "group", threadGroupName); } sb.append('\n'); sb.append("\tThread state: ").append(state.name()).append('\n'); }
protected void asJson(final StringBuilder sb) { sb.append('{'); for (int i = 0; i < data.size(); i++) { if (i > 0) { sb.append(", "); } StringBuilders.appendDqValue(sb, data.getKeyAt(i)).append(':'); StringBuilders.appendDqValue(sb, data.getValueAt(i)); } sb.append('}'); }
@Override public void printThreadInfo(final StringBuilder sb) { StringBuilders.appendDqValue(sb, threadInfo.getThreadName()); sb.append(" Id=").append(threadInfo.getThreadId()).append(' '); formatState(sb, threadInfo); if (threadInfo.isSuspended()) { sb.append(" (suspended)"); } if (threadInfo.isInNative()) { sb.append(" (in native)"); } sb.append('\n'); }
/** * Print the thread information. * @param sb The StringBuilder. */ @Override public void printThreadInfo(final StringBuilder sb) { StringBuilders.appendDqValue(sb, name).append(Chars.SPACE); if (isDaemon) { sb.append("daemon "); } sb.append("prio=").append(priority).append(" tid=").append(id).append(' '); if (threadGroupName != null) { StringBuilders.appendKeyDqValue(sb, "group", threadGroupName); } sb.append('\n'); sb.append("\tThread state: ").append(state.name()).append('\n'); }
private void checkForRemainingAttributes() { final Map<String, String> attrs = node.getAttributes(); if (!attrs.isEmpty()) { final StringBuilder sb = new StringBuilder(); for (final String key : attrs.keySet()) { if (sb.length() == 0) { sb.append(node.getName()); sb.append(" contains "); if (attrs.size() == 1) { sb.append("an invalid element or attribute "); } else { sb.append("invalid attributes "); } } else { sb.append(", "); } StringBuilders.appendDqValue(sb, key); } LOGGER.error(sb.toString()); } }