@Test public void testThread() { XLog.t().t().i("Message with thread info"); boolean result = (logsContainer.size() == 1 && logsContainer.get(0).msg.contains("Thread: ")); assertTrue("No thread info found", result); logsContainer.clear(); XLog.t().nt().i("Message without thread info"); result = (logsContainer.size() == 1 && !logsContainer.get(0).msg.contains("Thread: ")); assertTrue("Thread info found", result); }
builder.t(); } else { builder.nt();
/** * Start to customize a {@link Logger} and disable thread info. * * @return the {@link Logger.Builder} to build the {@link Logger} */ public static Logger.Builder nt() { return new Logger.Builder().nt(); }