Sets the PyQtGraph config options and emits a log message
421729
def setPgConfigOptions(**kwargs):
    
    for key, value in kwargs.items():
        logger.debug("Setting PyQtGraph config option: {} = {}".format(key, value))

    pg.setConfigOptions(**kwargs)
729623
def configure_warnings():
    
    if not sys.warnoptions:
        # Route warnings through python logging
        logging.captureWarnings(True)

        # DeprecationWarning is by default hidden, hence we force the
        # 'default' behavior on deprecation warnings which is not to hide
        # errors.
        warnings.simplefilter('default', DeprecationWarning)
        warnings.simplefilter('ignore', PendingDeprecationWarning)
1214337
def set_root_logger(config=None, **kwargs):
    
    config = config or app_config
    logging_config = config.get('logging') or {}
    kwargs.setdefault('level', logging_config.get('level'))
    kwargs.setdefault('format', logging_config.get('format'))
    logging.basicConfig(**kwargs)
311717
def setup_logging(debug, logfile=None):
    '''
    
    '''
    if debug:
        level = logging.DEBUG
    else:
        level = logging.INFO
    if logfile is not None:
        logging.basicConfig(format="%(asctime)s %(levelname)8s %(message)s", datefmt="%H:%M:%S %Y/%m/%d", level=level, filename=logfile)
    else:
        logging.basicConfig(format="%(asctime)s %(levelname)8s %(message)s", datefmt="%H:%M:%S %Y/%m/%d", level=level)
270102
def setLoggingFromOptions(options):
    
    #We can now set up the logging info.
    if options.logLevel is not None:
        setLogLevel(options.logLevel) #Use log level, unless flags are set..

    if options.logOff:
        setLogLevel("OFF")
    elif options.logInfo:
        setLogLevel("INFO")
    elif options.logDebug:
        setLogLevel("DEBUG")

    logger.info("Logging set at level: %s" % logLevelString)

    if options.logFile is not None:
        addLoggingFileHandler(options.logFile, options.logRotating)

    logger.info("Logging to file: %s" % options.logFile)
1227726
def setup(self):
        
        options = ""
        if self.get_option("port"):
            options = (options + " -b " + gethostname() +
                       ":%s" % (self.get_option("port")))
        # gethostname() is due to DISPATCH-156

        # for either present option, add --option=value to 'options' variable
        for option in ["ssl-certificate", "ssl-key", "ssl-trustfile"]:
            if self.get_option(option):
                options = (options + " --%s=" % (option) +
                           self.get_option(option))

        self.add_cmd_output([
            "qdstat -a" + options,  # Show Router Addresses
            "qdstat -n" + options,  # Show Router Nodes
            "qdstat -c" + options,  # Show Connections
            "qdstat -m" + options   # Show Broker Memory Stats
        ])

        self.add_copy_spec([
            "/etc/qpid-dispatch/qdrouterd.conf"
        ])
387722
def _set_pyqtgraph_title(layout):
    
    if 'title_size' in pytplot.tplot_opt_glob:
        size = pytplot.tplot_opt_glob['title_size']
    if 'title_text' in pytplot.tplot_opt_glob:
        if pytplot.tplot_opt_glob['title_text'] != '':
            layout.addItem(LabelItem(pytplot.tplot_opt_glob['title_text'], size=size, color='k'), row=0, col=0)
            return True
    return False
533902
def setup_logger(options):
    """"""
    LOGGER.setLevel(logging.INFO if options.verbose else logging.WARN)
    if options.report:
        LOGGER.removeHandler(STREAM)
        LOGGER.addHandler(logging.FileHandler(options.report, mode='w'))

    if options.options:
        LOGGER.info('Try to read configuration from: %r', options.options)
894209
def setup_logging():
    
    fmt = 'DBG<0>%(pathname)s:%(lineno)d  %(funcName)s: %(message)s'

    handler_stderr = logging.StreamHandler(sys.stderr)
    handler_stderr.setFormatter(logging.Formatter(fmt))
    if OPTIONS['--verbose'] == 1:
        handler_stderr.addFilter(logging.Filter(__name__))

    root_logger = logging.getLogger()
    root_logger.setLevel(logging.DEBUG)
    root_logger.addHandler(handler_stderr)
492480
def logging_config(logpath=None,
                   level=logging.DEBUG,
                   console_level=logging.INFO,
                   no_console=False):
    
    logger = logging.getLogger('nli')
    # Remove all the current handlers
    for handler in logger.handlers:
        logger.removeHandler(handler)
    logger.handlers = []
    logger.propagate = False
    logger.setLevel(logging.DEBUG)

    formatter = logging.Formatter('%(filename)s:%(funcName)s: %(message)s')

    if logpath is not None:
        print('All Logs will be saved to {}'.format(logpath))
        logfile = logging.FileHandler(logpath, mode='w')
        logfile.setLevel(level)
        logfile.setFormatter(formatter)
        logger.addHandler(logfile)

    if not no_console:
        # Initialze the console logging
        logconsole = logging.StreamHandler()
        logconsole.setLevel(console_level)
        logconsole.setFormatter(formatter)
        logger.addHandler(logconsole)
521815
def setup_logger(log_level, log_file=None, logger_name=None):
        
        applogger = AppLog(logger_name)
        level = getattr(logging, log_level.upper(), None)
        if not level:
            color_print("Invalid log level: %s" % log_level, "RED")
            sys.exit(1)
    
        # hide traceback when log level is INFO/WARNING/ERROR/CRITICAL
        if level >= logging.INFO:
            sys.tracebacklimit = 0
    
        if log_file:
            applogger._handle2file(log_file)
        else:
            applogger._handle2screen(color = True)
        
        applogger.logger.setLevel(level)
985022
def setup_logging(cli_options):
    """"""
    if cli_options.debug_info or get_debug_level() > 0:
        levels = {2: logging.INFO, 3: logging.DEBUG}
        log_level = levels[get_debug_level()]
        log_format = '%(asctime)s [%(levelname)s] [%(name)s] -> %(message)s'

        if cli_options.debug_output == 'file':
            log_file = 'spyder-debug.log'
        else:
            log_file = None

        logging.basicConfig(level=log_level,
                            format=log_format,
                            filename=log_file,
                            filemode='w+')
650279
def configure(self, listener):
        
        listener.capture([
            lambda msg: flavor(msg) == 'callback_query',
            {'message': self._chat_origin_included}
        ])

        listener.capture([
            lambda msg: flavor(msg) == 'callback_query',
            {'inline_message_id': self._inline_origin_included}
        ])
460360
def configure(self, options, conf):
        
        super(S3Logging, self).configure(options, conf)
        self.options = options
94501
def configure_logging(info=False, debug=False):
    
    if info:
        logging.basicConfig(level=logging.INFO,
                            format=LOG_FORMAT)
        logging.getLogger('requests').setLevel(logging.WARNING)
        logging.getLogger('urrlib3').setLevel(logging.WARNING)
        logging.getLogger('elasticsearch').setLevel(logging.WARNING)
    elif debug:
        logging.basicConfig(level=logging.DEBUG,
                            format=DEBUG_LOG_FORMAT)
    else:
        logging.basicConfig(level=logging.WARNING,
                            format=LOG_FORMAT)
        logging.getLogger('requests').setLevel(logging.WARNING)
        logging.getLogger('urrlib3').setLevel(logging.WARNING)
        logging.getLogger('elasticsearch').setLevel(logging.WARNING)
166091
def _setup_logging(self):
        
        self._log_level_delta = (self._args.quiet * 10) - (self._args.verbose * 10)
        level = max(1, self._default_log_level + self._log_level_delta)
        logging.basicConfig(level=level, format=LOG_FORMAT)
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')))