Overrides the default :func:`logging.Formatter.format` to add colors to
        the :obj:`record`'s :attr:`levelname` and :attr:`name` attributes.

def format(self, record):
        """
        Overrides the default :func:`logging.Formatter.format` to add colors to
        the :obj:`record`'s :attr:`levelname` and :attr:`name` attributes.
        """
        level_length = len(record.levelname)
        if record.levelname in self._colors_map:
            record.msg = '{0}{1}\033[0;0m'.format(
                self._colors_map[record.levelname],
                record.msg
            )
            record.levelname = '{0}{1}\033[0;0m'.format(
                self._colors_map[record.levelname],
                record.levelname
            )
        record.levelname += ' ' * (8 - level_length)
        record.name = '\033[37m\033[1m{0}\033[0;0m'.format(record.name)
        return super(ColorFormatter, self).format(record)