code: def format(self, record):
          
          levelname = getattr(record, 'levelname', None)
          record.levelcolor = ''
          record.endlevelcolor = ''
  
          if levelname:
              level_color = getattr(self.TermColors, levelname, '')
              record.levelcolor = level_color
              record.endlevelcolor = self.TermColors.ENDC if level_color else ''
  
          return super(FleakerLogFormatter, self).format(record)
docs: Format the log record.