Re-enables logging statements in these lines whose logging level falls
    between the specified minimum and maximum levels and which were disabled
    by disable_logging() before.
187398
def restore_logging(lines, min_level_value, max_level_value):
    """"""
    output = ''
    while lines:
        line = lines[0]
        if line.lstrip() != PASS_LINE_CONTENTS:
            # not our pass statement here, so just leave the line as-is and keep going
            output += line
            lines = lines[1:]
        else:
            # a logging call will start on the next line: find all the lines it includes and those it does not
            logging_lines, remaining_lines = split_call(lines[1:])
            lines = remaining_lines
            logging_stmt = ''.join(logging_lines)
            original_lines = line + logging_stmt

            # replace the logging statement if its level falls b/w min and max
            if not check_level(logging_stmt, True, min_level_value, max_level_value):
                output += logging_stmt
            else:
                # uncomment_lines of this logging statement and remove the pass line
                uncommented_logging_lines = uncomment_lines(logging_lines)
                logging.info('replacing:\n%s\nwith this:\n%s' % (original_lines.rstrip(), uncommented_logging_lines.rstrip()))
                output += uncommented_logging_lines
    return output
1201655
def set_debug(enabled: bool):
    
    global _DEBUG_ENABLED

    if not enabled:
        log('Disabling debug output...', logger_name=_LOGGER_NAME)
        _DEBUG_ENABLED = False
    else:
        _DEBUG_ENABLED = True
        log('Enabling debug output...', logger_name=_LOGGER_NAME)
599957
public void setLoggerLevel(String level) {
        if ("TRACE".equalsIgnoreCase(level)) {
            this.level = TRACE;
        } else if ("DEBUG".equalsIgnoreCase(level)) {
            this.level = DEBUG;
        } else if ("INFO".equalsIgnoreCase(level)) {
            this.level = INFO;
        } else if ("WARN".equalsIgnoreCase(level)) {
            this.level = WARN;
        } else if ("ERROR".equalsIgnoreCase(level)) {
            this.level = ERROR;
        }
    }
1204182
def silence(temporary_level = ::Logger::ERROR)
      begin
        old_logger_level, self.level = level, temporary_level
        yield self
      ensure
        self.level = old_logger_level
      end
    end
566979
def set_log_level(self, level: str) -> None:
        """"""
        if level == 'info':
            to_set = logging.INFO
        if level == 'debug':
            to_set = logging.DEBUG
        if level == 'error':
            to_set = logging.ERROR
        self.log.setLevel(to_set)
163534
def disable_logging(logger=None):
    
    logger = logger or logging.getLogger()
    disabled = logger.disabled
    logger.disabled = True
    yield
    logger.disabled = disabled
1226226
def _suppress_distutils_logs():
    
    f = distutils.log.Log._log

    def _log(log, level, msg, args):
        if level >= distutils.log.ERROR:
            f(log, level, msg, args)

    distutils.log.Log._log = _log
    yield
    distutils.log.Log._log = f
384286
def disable_logger(self, disabled=True):
        
        # Disable standard IO streams
        if disabled:
            sys.stdout = _original_stdout
            sys.stderr = _original_stderr
        else:
            sys.stdout = self.__stdout_stream
            sys.stderr = self.__stderr_stream

        # Disable handlers
        self.logger.disabled = disabled
706717
public synchronized static void silenceLogging() {
        if (SplitlogLoggerFactory.state == SplitlogLoggingState.OFF) {
            return;
        }
        SplitlogLoggerFactory.state = SplitlogLoggingState.OFF;
        SplitlogLoggerFactory.messageCounter.set(0);
        /*
         * intentionally using the original logger so that this message can not
         * be silenced
         */
        LoggerFactory.getLogger(SplitlogLoggerFactory.class).info("Forcibly disabled Splitlog's internal logging.");
    }
600056
public static final void setJavolutionLogLevel(org.slf4j.Logger log) {
    // disable Javolution info-level logging
    if (log.isTraceEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.DEBUG);
    } else if (log.isDebugEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.DEBUG);
    } else if (log.isInfoEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.INFO);
    } else if (log.isWarnEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.WARNING);
    } else if (log.isErrorEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.ERROR);
    } else {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.FATAL);
    }
  }
266400
def silence_sass_warnings
      old_level, Sass.logger.log_level = Sass.logger.log_level, :error
      yield
    ensure
      Sass.logger.log_level = old_level
    end
889884
def suppress_logging(log_level=logging.CRITICAL):
    """"""
    logging.disable(log_level)
    yield
    logging.disable(logging.NOTSET)
749048
def enable_pretty_logging(logger='calmjs', level=logging.DEBUG, stream=None):
    

    def cleanup():
        logger.removeHandler(handler)
        logger.level = old_level

    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    old_level = logger.level
    handler = logging.StreamHandler(stream)
    handler.setFormatter(logging.Formatter(
        u'%(asctime)s %(levelname)s %(name)s %(message)s'))
    logger.addHandler(handler)
    logger.setLevel(level)
    return cleanup
645863
def config_logging(args):
    '''  '''
    if args.quiet:
        logging.getLogger().setLevel(logging.CRITICAL)
    elif args.verbose:
        logging.getLogger().setLevel(logging.DEBUG)
691080
def restore_levels
      synchronize do
        @original_outputter_levels.each do |name, level|
          outputter = Log4r::Outputter[name]
          outputter.level = level if outputter.level != level
        end
        @original_outputter_levels.clear
        
        @original_levels.each do |name, level|
          logger = Lumber.find_or_create_logger(name)
          logger.level = level if logger.level != level
        end
        @original_levels.clear
      end
    end
242509
def set_loglevel(self, level):
        
        self.log_level = level
        log_manager.config_stdio(default_level=level)
386659
def _set_log_level(self):
        
        # set log level on logger
        log_level = "INFO"
        if hasattr(self._config, "level") and self._config.level.upper() in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]:
            log_level = self._config.level.upper()
        self._log_level = log_level