def format(self, record):
if not self.is_tty:<EOL><INDENT>return super(CLIHandler, self).format(record)<EOL><DEDENT>level_abbrev = record.levelname[<NUM_LIT:0>]<EOL>time_and_level = color_string(<EOL>color_for_level(record.levelno),<EOL>"<STR_LIT>" + level_abbrev + "<STR_LIT:]>"<EOL>)<EOL>thread = color_string(<EOL>color_for_thread(record.thread),<EOL>"<STR_LIT>"<EOL>)<EOL>formatter = logging.Formatter(<EOL>time_and_level + thread + "<STR_LIT>", "<STR_LIT>"<EOL>)<EOL>return formatter.format(record)<EOL>
Formats a given log record to include the timestamp, log level, thread
ID and message.  Colorized if coloring is available.