/** * Mark the beginning of an action */ public static void start(String message, String color) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "activate " + tn + " " + color); }
/** * Link from source to current thread. */ public static void addRelation(String source, String message) { if (!log.isDebugEnabled()) { return; } log.debug(PREFIX + source + " --> " + getThreadName() + ": " + format(message)); }
/** * Mark the end of the previous action. */ public static void stop(String message) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "deactivate " + tn); }
/** * Mark the last action as failure */ public static void destroy(String message) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "destroy " + tn); }
/** * 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); }