Shortcut for setting log levels. (:debug, :info, :warn, :error, :fatal)
436713
def level=(level)
      @logger.level = case level
      when :debug, ::Logger::DEBUG
        Java::org.apache.log4j.Level::DEBUG
      when :info, ::Logger::INFO
        Java::org.apache.log4j.Level::INFO
      when :warn, ::Logger::WARN
        Java::org.apache.log4j.Level::WARN
      when :error, ::Logger::ERROR
        Java::org.apache.log4j.Level::ERROR
      when :fatal, ::Logger::FATAL
        Java::org.apache.log4j.Level::FATAL
      else
        raise NotImplementedError
      end
    end
387499
def set_level_for_logger_and_its_handlers(log: logging.Logger,
                                          level: int) -> None:
    
    log.setLevel(level)
    for h in log.handlers:  # type: logging.Handler
        h.setLevel(level)
950690
def set_log_level(level):
    
    from .._connect import main as _glconnect
    unity = _glconnect.get_unity()
    return unity.set_log_level(level)
703209
def config_logging(level):
    

    logger = logging.getLogger('')
    logger.setLevel(level)
    if level < logging.DEBUG:
        log_format = "%(asctime)s %(message)s"
    else:
        log_format = "%(asctime)s %(module)s : %(lineno)d  %(message)s"
    sh = logging.StreamHandler()
    sh.formatter = logging.Formatter(fmt=log_format)
    logger.handlers = []
    logger.addHandler(sh)
1229672
def configure_logging(verbosity):
    

    root = logging.getLogger()

    formatter = logging.Formatter('%(asctime)s.%(msecs)03d %(levelname).3s %(name)s %(message)s',
                                  '%y-%m-%d %H:%M:%S')
    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    loglevels = [logging.CRITICAL, logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG]
    if verbosity >= len(loglevels):
        verbosity = len(loglevels) - 1

    level = loglevels[verbosity]

    root.setLevel(level)
    root.addHandler(handler)
270383
def enable_logging(log_level):
    # type: (typing.Union[None, int]) -> None
    
    root_logger = logging.getLogger()
    root_logger.setLevel(logging.DEBUG)
    logfile_handler = logging.StreamHandler(_LOGFILE_STREAM)
    logfile_handler.setLevel(logging.DEBUG)
    logfile_handler.setFormatter(logging.Formatter(
        '%(levelname)s [%(asctime)s][%(name)s] %(message)s'))
    root_logger.addHandler(logfile_handler)
    if signal.getsignal(signal.SIGTERM) == signal.SIG_DFL:
        signal.signal(signal.SIGTERM, _logfile_sigterm_handler)
    if log_level:
        handler = logging.StreamHandler()
        handler.setFormatter(_LogColorFormatter())
        root_logger.setLevel(log_level)
        root_logger.addHandler(handler)
1168983
def c_log(level, message):
    """"""
    c_level = level
    level = LEVELS_F2PY[c_level]
    logger.log(level, message)
565466
def configure_log_level(v, vv, vvv)
      if vvv
        log.level = ::Logger::DEBUG
      elsif vv
        log.level = ::Logger::INFO
      elsif v
        log.level = ::Logger::WARN
      else
        log.level = ::Logger::ERROR
      end
    end
1180975
def setup_logging(verbosity, no_color, user_log_file):
    

    # Determine the level to be logging at.
    if verbosity >= 1:
        level = "DEBUG"
    elif verbosity == -1:
        level = "WARNING"
    elif verbosity == -2:
        level = "ERROR"
    elif verbosity <= -3:
        level = "CRITICAL"
    else:
        level = "INFO"

    level_number = getattr(logging, level)

    # The "root" logger should match the "console" level *unless* we also need
    # to log to a user log file.
    include_user_log = user_log_file is not None
    if include_user_log:
        additional_log_file = user_log_file
        root_level = "DEBUG"
    else:
        additional_log_file = "/dev/null"
        root_level = level

    # Disable any logging besides WARNING unless we have DEBUG level logging
    # enabled for vendored libraries.
    vendored_log_level = "WARNING" if level in ["INFO", "ERROR"] else "DEBUG"

    # Shorthands for clarity
    log_streams = {
        "stdout": "ext://sys.stdout",
        "stderr": "ext://sys.stderr",
    }
    handler_classes = {
        "stream": "pip._internal.utils.logging.ColorizedStreamHandler",
        "file": "pip._internal.utils.logging.BetterRotatingFileHandler",
    }

    logging.config.dictConfig({
        "version": 1,
        "disable_existing_loggers": False,
        "filters": {
            "exclude_warnings": {
                "()": "pip._internal.utils.logging.MaxLevelFilter",
                "level": logging.WARNING,
            },
        },
        "formatters": {
            "indent": {
                "()": IndentingFormatter,
                "format": "%(message)s",
            },
            "indent_with_timestamp": {
                "()": IndentingFormatter,
                "format": "%(message)s",
                "add_timestamp": True,
            },
        },
        "handlers": {
            "console": {
                "level": level,
                "class": handler_classes["stream"],
                "no_color": no_color,
                "stream": log_streams["stdout"],
                "filters": ["exclude_warnings"],
                "formatter": "indent",
            },
            "console_errors": {
                "level": "WARNING",
                "class": handler_classes["stream"],
                "no_color": no_color,
                "stream": log_streams["stderr"],
                "formatter": "indent",
            },
            "user_log": {
                "level": "DEBUG",
                "class": handler_classes["file"],
                "filename": additional_log_file,
                "delay": True,
                "formatter": "indent_with_timestamp",
            },
        },
        "root": {
            "level": root_level,
            "handlers": ["console", "console_errors"] + (
                ["user_log"] if include_user_log else []
            ),
        },
        "loggers": {
            "pip._vendor": {
                "level": vendored_log_level
            }
        },
    })

    return level_number
293713
def set_verbose_logging(verbose: bool) -> None:
    """"""
    if verbose:
        set_loglevel(logging.DEBUG)
    else:
        set_loglevel(logging.INFO)
1122362
def set_level(logger=None, log_level=None):
    '''

    '''
    log_level = logging.getLevelName(os.getenv('VERBOSITY', 'WARNING'))
    logging.getLogger(logger).setLevel(log_level)
242509
def set_loglevel(self, level):
        
        self.log_level = level
        log_manager.config_stdio(default_level=level)
887417
def setup_logging(level):
    
    format = "[%(asctime)s] %(levelname)s:%(name)s:%(message)s"
    logging.basicConfig(
        level=level, stream=sys.stdout, format=format, datefmt="%Y-%m-%d %H:%M:%S"
    )
792861
def log_level_type(arg):
	""""""
	if not arg.upper() in ('NOTSET', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'):
		raise argparse.ArgumentTypeError("{0} is not a valid log level".format(repr(arg)))
	return getattr(logging, arg.upper())
452184
def set_debug(self, set_to=True):
        
        if set_to:
            StreamHandler(sys.stdout).push_application()
            self._log.level = logbook.DEBUG
        self.debug = set_to
1036538
def set_log_level_command(opts)
      Log.level = opts[:level] if [ :debug, :info, :warn, :error, :fatal ].include?(opts[:level])
      CommandIO.instance.reply(opts[:conn], Log.level)
    end
785691
def log_handler(level: str, message: str) -> None:
    """"""
    message = 'JS: ' + str(message)
    if level == 'error':
        logger.error(message)
    elif level == 'warn':
        logger.warning(message)
    elif level == 'info':
        logger.info(message)
    elif level == 'debug':
        logger.debug(message)