/** * Get the thread name sanitized for plantuml */ public static String getThreadName() { return sanitize(Thread.currentThread().getName()); }
private static String format(String message) { String ret = sanitize(message).replace(", ", ",\\n"); ret = insertNewLine(ret); return ret; }
/** * Mark the beginning of an action initiated by the caller. */ public static void startFrom(final String callerThread, final String message, final String color) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + sanitize(callerThread) + " o--> " + tn + ": Initiate\n" + PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "activate " + tn + " " + color); }