def METHOD_NAME(self, record):
    levelname = record.levelname
    if levelname in self.COLORS:
        levelname_color = self.COLORS[levelname] + levelname + CEND
        record.levelname = levelname_color
    return logging.Formatter.METHOD_NAME(self, record)