Set level for given logger
    :param name: Name of logger to set the level for
    :param level: The new level, see possible levels from python logging library
507873
def set_level(name, level):
    
    if name is None or name == "" or name == "bench":
        logging.getLogger("bench").setLevel(level)
    loggername = "bench." + name
    logging.getLogger(loggername).setLevel(level)
562189
def logger_level=(level)
      logger.level = LOGGER_LEVEL[level] if LOGGER_LEVEL.key?(level)
      logger
    end
517946
public void setLevel (Level level) {

		this.defaultLevel = level;
		logger.setLevel (level);
		for (Handler handler : logger.getHandlers ()) {
			handler.setLevel (level);
		}
	}
385307
def log_level(level)
      levels = { :debug => 0, :info => 1, :warn => 2, :error => 3, :fatal => 4 }

      unless levels.include? level
        raise ArgumentError, "Invalid log level: #{level.inspect}\n" \
                             "Expected one of: #{levels.keys.inspect}"
      end

      @options[:logger].level = levels[level]
    end
938034
def level=(new_level)
      level_int = LEVEL_NAMES.key?(new_level) ? new_level : LEVELS[new_level]
      raise ArgumentError, "Log level must be one of :trace, :debug, :info, :warn, :error, or :fatal" if level_int.nil?
      loggers.each { |l| l.level = level_int }
    end
1005319
def log_level(io_handler, level=None, name=None):
        
        # Get the logger
        logger = logging.getLogger(name)

        # Normalize the name
        if not name:
            name = "Root"

        if not level:
            # Level not given: print the logger level
            io_handler.write_line(
                "{0} log level: {1} (real: {2})",
                name,
                logging.getLevelName(logger.getEffectiveLevel()),
                logging.getLevelName(logger.level),
            )
        else:
            # Set the logger level
            try:
                logger.setLevel(level.upper())
                io_handler.write_line("New level for {0}: {1}", name, level)
            except ValueError:
                io_handler.write_line("Invalid log level: {0}", level)
387314
def new_log_level(level, name, logger_name=None):
    
    @CustomLogLevel(level, name, logger_name)
    def _default_template(logger, msg, *args, **kwargs):
        return msg, args, kwargs
490152
def add_log_level(value, name):
    
    logging.addLevelName(value, name)
    setattr(logging, name, value)
1122362
def set_level(logger=None, log_level=None):
    '''

    '''
    log_level = logging.getLevelName(os.getenv('VERBOSITY', 'WARNING'))
    logging.getLogger(logger).setLevel(log_level)
52217
def _create_logger(name='did', level=None):
        
        # Create logger, handler and formatter
        logger = logging.getLogger(name)
        handler = logging.StreamHandler()
        handler.setFormatter(Logging.ColoredFormatter())
        logger.addHandler(handler)
        # Save log levels in the logger itself (backward compatibility)
        for level in Logging.LEVELS:
            setattr(logger, level, getattr(logging, level))
        # Additional logging constants and methods for details and data
        logger.DATA = LOG_DATA
        logger.DETAILS = LOG_DETAILS
        logger.ALL = LOG_ALL
        logger.details = lambda message: logger.log(
            LOG_DETAILS, message) # NOQA
        logger.data = lambda message: logger.log(
            LOG_DATA, message) # NOQA
        logger.all = lambda message: logger.log(
            LOG_ALL, message) # NOQA
        return logger
362685
function Logger (level, name) {
  if (name) {
    debug = require('debug')(typeof name === 'string' ? name : 'vxx');
  }
  this.level = level;
  this.debug('Logger started');
}
95047
def _check_log_level(self, level):
        '''
        
        '''
        if level not in list(self.level_dict.keys()):
            self.log_level = 'DEBUG'
            self.logger.warn("Unknown log level '{lev}', defaulting to DEBUG"
                             .format(lev=level))
927755
def get_logger(name, level=None, fmt=':%(lineno)d: %(message)s'):
        
        if name not in Logger.loggers:
            if Logger.level is None and level is None:
                Logger.level = level = logging.ERROR
            elif Logger.level is None:
                Logger.level = level
            elif level is None:
                level = Logger.level
            logger = logging.getLogger(name)
            logger_handler = logging.StreamHandler()
            logger_handler.setFormatter(LoggingFormatter(fmt=name + fmt))
            logger.addHandler(logger_handler)
            logger.setLevel(level)
            Logger.loggers[name] = logger
        return Logger.loggers[name]
115204
def set_loglevel(level: Union[int, str, None] = None) -> None:
    
    if level is not None:
        lv = level_to_int(level)
    elif config.logging:
        lv = level_to_int(config.logging)
    elif config.debug:
        lv = logging.DEBUG
    else:
        lv = logging.INFO
    root_logger.setLevel(lv)
    _log_handler.setLevel(lv)
970273
def set_log_level(logger, level):  # type: (logging.Logger, int) -> None
    """"""
    if level > 2:
        level = 2
    if level < -1:
        level = -1

    levels = {
        -1: logging.ERROR,
        0: logging.WARN,
        1: logging.INFO,
        2: logging.DEBUG
    }
    logger.setLevel(levels[level])
176919
def getLogger(name, level = logging.INFO):
        
        # create logger
        logger = logging.getLogger(name) 
        logger.setLevel(level)
        # create console handler and set level to debug
        ch = logging.StreamHandler()
        ch.setLevel(level)
        # create formatter
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        # add formatter to ch
        ch.setFormatter(formatter)
        # add ch to logger
        logger.addHandler(ch)
        return logger
917949
def set_log_level(self, level, keep=True):
        
        self._set_log_level(level)
        self._log_level_set_explicitly = keep