Setup logging via ini-file from logging_conf_file option.
194817
def _conf(cls, opts):
        """"""
        logging_conf = cls.config.get('core', 'logging_conf_file', None)
        if logging_conf is None:
            return False

        if not os.path.exists(logging_conf):
            # FileNotFoundError added only in Python 3.3
            # https://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy
            raise OSError("Error: Unable to locate specified logging configuration file!")

        logging.config.fileConfig(logging_conf)
        return True
242073
function initLogging(conf) {
    logger.setLevels({
        error: 0,
        warn: 1,
        info: 2,
        verbose: 3,
        debug: 4,
        silly: 5
    });
    logger.addColors({
        debug: 'green',
        info: 'cyan',
        silly: 'magenta',
        warn: 'yellow',
        error: 'red'
    });

    logger.remove(logger.transports.Console);
    logger.add(logger.transports.Console, {
        level: conf.level || DEF_LOGGER_LEVEL,
        silent: conf.silent || DEF_LOGGER_SILENT,
        colorize: true,
        timestamp: true
    });
}
46053
def configure(conf, default_config=None):
    
    if conf.logconfig and os.path.isfile(conf.logconfig):
        logging.config.fileConfig(conf.logconfig,
                                  disable_existing_loggers=False)
    elif default_config and os.path.isfile(default_config):
        logging.config.fileConfig(default_config,
                                  disable_existing_loggers=False)
    else:
        init_console_logging(conf)
383180
def setup_logger(logging_level, logging_format):
    """"""
    logger = logging.getLogger("ray")
    if type(logging_level) is str:
        logging_level = logging.getLevelName(logging_level.upper())
    logger.setLevel(logging_level)
    global _default_handler
    if _default_handler is None:
        _default_handler = logging.StreamHandler()
        logger.addHandler(_default_handler)
    _default_handler.setFormatter(logging.Formatter(logging_format))
    logger.propagate = False
563623
def setup_logging(self):
        
        logging.getLogger('amqp').setLevel(str_to_logging(self.get('logging', 'amqp')))
        logging.getLogger('rdflib').setLevel(str_to_logging(self.get('logging', 'rdflib')))
592409
def load_config(filename="logging.ini", *args, **kwargs):
    
    logging.config.fileConfig(filename, *args, **kwargs)
13830
def init_logging():
    """"""
    with open(os.path.join(os.path.dirname(__file__),'logging.conf'), 'r') as yf:
        config = yaml.load(yf)
    logging.config.dictConfig(config)
632772
def setup_logging(format="%(asctime)s - %(levelname)s - %(message)s", level='INFO'):
    """"""
    try:
        import coloredlogs
        coloredlogs.install(fmt=format, level=level)
    except ImportError:
        logging.basicConfig(format=format, level=level)
287644
def setup_options(opts):
    ''''''
    if opts.quiet:
        logger.log.setLevel(logging.WARNING)
        logger.GLOBAL_LOG_LEVEL = logging.WARNING

    if opts.verbose:
        logger.log.setLevel(logging.DEBUG)
        logger.GLOBAL_LOG_LEVEL = logging.DEBUG
1071840
def _setup_file_logger(cls, session: AppSession, args):
        '''
        '''
        if not (args.output_file or args.append_output):
            return

        logger = logging.getLogger()

        formatter = logging.Formatter(
            '%(asctime)s - %(name)s - %(levelname)s - %(message)s')

        if args.output_file:
            filename = args.output_file
            mode = 'w'
        else:
            filename = args.append_output
            mode = 'a'

        session.file_log_handler = handler = logging.FileHandler(
            filename, mode, encoding='utf-8')
        handler.setFormatter(formatter)
        logger.addHandler(handler)

        if args.verbosity == logging.DEBUG:
            handler.setLevel(logging.DEBUG)
        else:
            handler.setLevel(logging.INFO)
1066890
def setupLogFile(self):
		""""""
		self.logWrite("\n###############################################")
		self.logWrite("calcpkg.py log from " + str(datetime.datetime.now()))
		self.changeLogging(True)
665220
def setup_logging(name):
    """"""
    logger = logging.getLogger(__name__)
    if 'NVIM_PYTHON_LOG_FILE' in os.environ:
        prefix = os.environ['NVIM_PYTHON_LOG_FILE'].strip()
        major_version = sys.version_info[0]
        logfile = '{}_py{}_{}'.format(prefix, major_version, name)
        handler = logging.FileHandler(logfile, 'w', 'utf-8')
        handler.formatter = logging.Formatter(
            '%(asctime)s [%(levelname)s @ '
            '%(filename)s:%(funcName)s:%(lineno)s] %(process)s - %(message)s')
        logging.root.addHandler(handler)
        level = logging.INFO
        if 'NVIM_PYTHON_LOG_LEVEL' in os.environ:
            lvl = getattr(logging,
                          os.environ['NVIM_PYTHON_LOG_LEVEL'].strip(),
                          level)
            if isinstance(lvl, int):
                level = lvl
        logger.setLevel(level)
626538
def setup_logging(
        config_directories=None,
        config_file=None,
        default_level=logging.INFO,
        default_filename="logging.yml"
):
    
    config_found = False
    config_file_path = None
    if config_file:
        config_file_path = config_file
        if os.path.isfile(config_file_path) and os.access(config_file_path, os.R_OK):
            config_found = True
    else:
        for directory in config_directories:
            if directory is None:
                continue
            config_file_path = os.path.join(directory, default_filename)
            if os.path.isfile(config_file_path) and os.access(config_file_path, os.R_OK):
                config_found = True
                break
    if config_found:
        with open(config_file_path, 'rt') as ymlfile:
            config = yaml.safe_load(ymlfile.read())
        logging.config.dictConfig(config)
    else:
        logging.basicConfig(level=default_level)
326344
def _initialize_logging():
    

    # Starting the console handler if a terminal is available.
    if sys.stdout.isatty() or platform.system() in ("Darwin", "Linux"):
        RuntimeGlobals.logging_console_handler = foundations.verbose.get_logging_console_handler()

    # Defining logging formatters.
    RuntimeGlobals.logging_formatters = {"Default": foundations.verbose.LOGGING_DEFAULT_FORMATTER,
                                         "Extended": foundations.verbose.LOGGING_EXTENDED_FORMATTER,
                                         "Standard": foundations.verbose.LOGGING_STANDARD_FORMATTER}
1307305
function configure_logging() {
  if ('log' in CONF) {

    if ('plugin' in CONF.log) { process.env.NODE_LOGGER_PLUGIN = CONF.log.plugin; }
    if ('level'  in CONF.log) { process.env.NODE_LOGGER_LEVEL  = CONF.log.level; }

    if ('customlevels' in CONF.log) {
      for (var key in CONF.log.customlevels) {
        process.env['NODE_LOGGER_LEVEL_' + key] = CONF.log.customlevels[key];
      }
    }
  }
}
1288391
def __get_logging_options(cmd_line_options, conf_file_options=None):
    
    options = {}

    for option in DEFAULT_OPTIONS['logging'].keys():
        options[option] = DEFAULT_OPTIONS['logging'][option]

        if conf_file_options and option in conf_file_options:
            options[option] = conf_file_options[option]

        if cmd_line_options and option in cmd_line_options:
            options[option] = cmd_line_options[option]

    return options
360036
def configure_logging(conf):
    """"""
    root_logger = logging.getLogger()
    root_logger.setLevel(getattr(logging, conf.loglevel.upper()))
    if conf.logtostderr:
        add_stream_handler(root_logger, sys.stderr)
    if conf.logtostdout:
        add_stream_handler(root_logger, sys.stdout)