Sets the level of a logger

def set_logger(self, logger_name, level, handler=None):
        """
        Sets the level of a logger
        """
        if 'loggers' not in self.config:
            self.config['loggers'] = {}
        real_level = self.real_level(level)
        self.config['loggers'][logger_name] = {'level': real_level}
        if handler:
            self.config['loggers'][logger_name]['handlers'] = [handler]