@Test public void truncateSpecificLength() throws Exception { String s = CommonUtils.randomAlphaNumString(LogUtils.MAX_TRUNCATED_LENGTH); for (int length = 1; length < LogUtils.MAX_TRUNCATED_LENGTH; length++) { String truncated = LogUtils.truncateMessageLineLength(s, length); assertTrue(truncated.startsWith(s.substring(0, length) + " ...")); } }
public static String truncateMessageLineLength(Object message) { return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH); }
LogUtils { public static String truncateMessageLineLength(Object message) { return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH); } }
LogUtils { public static String truncateMessageLineLength(Object message) { return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH); } private  LogUtils(); }
LogUtils { public static String truncateMessageLineLength(Object message) { return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH); } private  LogUtils(); static LogInfo setLogLevel(String logName, String level); static void warnWithException(Logger logger, String message, Object ...args); static String truncateMessageLineLength(Object message); static String truncateMessageLineLength(Object message, int maxLineLength); }
LogUtils { public static String truncateMessageLineLength(Object message) { return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH); } private  LogUtils(); static LogInfo setLogLevel(String logName, String level); static void warnWithException(Logger logger, String message, Object ...args); static String truncateMessageLineLength(Object message); static String truncateMessageLineLength(Object message, int maxLineLength); static final int MAX_TRUNCATED_LENGTH; }