public String format(LogRecord logRecord) {
// Create a StringBuffer to contain the formatted record
// start with the date.
StringBuffer sb = new StringBuffer();
Ansi ansi = ansiForLevel(logRecord.getLevel());
sb.append(ansi.colorize('[' + logRecord.getLevel().getName() + ']')).append(' ');
// Get the formatted message (includes localization
// and substitution of paramters) and add it to the buffer
sb.append(formatMessage(logRecord));
sb.append('\n');