Print all configuration parameters to the log.
1030
private void logParams(String header) {
        m_logger.debug(header);
        for (String paramName : m_serviceParamMap.keySet()) {
            Object paramValue = m_serviceParamMap.get(paramName);
            logParam(paramName, paramValue, "   ");
        }
    }
200670
def logging_config(self):
        
        cfg = self._conf_values.get('pyemma', 'logging_config')
        if cfg == 'DEFAULT':
            cfg = os.path.join(self.cfg_dir, Config.DEFAULT_LOGGING_FILE_NAME)
        return cfg
1305681
def setup_logging(logging_config, debug=False):
    """"""

    if logging_config is not None:
        logging.config.fileConfig(logging_config)

    else:
        logging.basicConfig(level=debug and logging.DEBUG or logging.ERROR)
336706
def params(self):
        
        payload = self.payload
        d = {}
        for i, p in enumerate(payload["currentConfiguration"]):
            type_name = p["typeName"]
            cp = payload["configurationParameters"][i]["message"]
            name = cp["parameterName"]
            if type_name == "BTMParameterQuantity":
                try:
                    v = q(p["message"]["expression"])
                except:
                    v = q(p["message"]["value"], p["message"]["units"])
            elif type_name == "BTMParameterBoolean":
                v = p["message"]["value"]
            elif type_name == "BTMParameterEnum":
                enum = p["message"]["value"]
                enum_map = {d['message']['option']: i for i, d in enumerate(cp['options'])}
                v = cp['options'][enum_map[enum]]['message']['optionName']
            d[name] = v
        return d
1002525
def configure_logging(level=logging.DEBUG):
    """"""
    if level == logging.DEBUG:
        # For debugging purposes, log from everyone!
        logging.basicConfig(
            level=logging.DEBUG,
            format='%(asctime)s - %(levelname)s - %(message)s'
        )
        return logging

    logger = logging.getLogger(__name__)
    logger.setLevel(level)
    formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
    ch = logging.StreamHandler()
    ch.setLevel(level)
    ch.setFormatter(formatter)
    logger.addHandler(ch)
    return logger
725112
@Nonnull
    public String printLog4jEffectiveConfiguration() {
        try {
            StringWriter writer = new StringWriter();
            PropertyPrinter propertyPrinter = new PropertyPrinter(new PrintWriter(writer));
            propertyPrinter.print(new PrintWriter(writer));
            return writer.toString();
        } catch (RuntimeException e) {
            logger.warn("Exception generating log4j configuration", e);
            throw e;
        }
    }
737244
def print_params(self, allpars=False, loglevel=logging.INFO):
        """"""

        pars = self.get_params()

        o = '\n'
        o += '%4s %-20s%10s%10s%10s%10s%10s%5s\n' % (
            'idx', 'parname', 'value', 'error',
            'min', 'max', 'scale', 'free')

        o += '-' * 80 + '\n'

        src_pars = collections.OrderedDict()
        for p in pars:

            src_pars.setdefault(p['src_name'], [])
            src_pars[p['src_name']] += [p]

        free_sources = []
        for k, v in src_pars.items():

            for p in v:
                if not p['free']:
                    continue

                free_sources += [k]

        for k, v in src_pars.items():

            if not allpars and k not in free_sources:
                continue

            o += '%s\n' % k
            for p in v:

                o += '%4i %-20.19s' % (p['idx'], p['par_name'])
                o += '%10.3g%10.3g' % (p['value'], p['error'])
                o += '%10.3g%10.3g%10.3g' % (p['min'], p['max'],
                                             p['scale'])

                if p['free']:
                    o += '    *'
                else:
                    o += '     '

                o += '\n'

        self.logger.log(loglevel, o)
758653
def main():
    
    configParser = FileParser()
    logging.config.dictConfig(
        configParser.load_from_file(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'settings', 'logging.yml'))
    )
    ApiDoc().main()
234688
def print_values(self, parameter):
        
        if parameter in self.VALUES:
            self.print_info(u"Available values for parameter '%s':" % parameter)
            self.print_generic(u"\n".join(self.VALUES[parameter]))
            return self.HELP_EXIT_CODE
        if parameter not in [u"?", u""]:
            self.print_error(u"Invalid parameter name '%s'" % parameter)
        self.print_info(u"Parameters for which values can be listed:")
        self.print_generic(u"\n".join(sorted(self.VALUES.keys())))
        return self.HELP_EXIT_CODE
926666
def print_parameters(self):
        
        self.print_info(u"Available parameters:")
        self.print_generic(u"\n" + u"\n".join(self.PARAMETERS) + u"\n")
        return self.HELP_EXIT_CODE
1001580
def print_config(self):
        """"""
        linters = self.user_linters or list(self.linters)
        print('linters:', ', '.join(linters))
        for key, value in self._config.items():
            if key != 'linters':
                print('{}: {}'.format(key, value))
451701
function print() {
    getLoggers().forEach(function (logger) {
        consoleAppender.log(formatText('Logger %b: %b, parent:%b', logger.name, logger.level, logger.parent));
    });
}
839075
def _parse_logging(log_values: dict, service_config: dict):
        
        for log_key, log_value in log_values.items():
            if 'driver' in log_key:
                service_config['log_driver'] = log_value
            if 'options' in log_key:
                service_config['log_driver_options'] = log_value
1318382
def print_all_param_defaults():
    """"""
    print("_______________________________________________________________________________")
    print("")
    print("                           Parameter Default Values")
    print("")
    classes = descendents(Parameterized)
    classes.sort(key=lambda x:x.__name__)
    for c in classes:
        c.print_param_defaults()
    print("_______________________________________________________________________________")
711341
def dump_config(self):
        """"""
        yaml_content = self.get_merged_config()
        print('YAML Configuration\n%s\n' % yaml_content.read())
        try:
            self.load()
            print('Python Configuration\n%s\n' % pretty(self.yamldocs))
        except ConfigError:
            sys.stderr.write(
                'config parse error. try running with --logfile=/dev/tty\n')
            raise
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)
316443
def _print_config_text(tree, indentation=0):
    '''
    
    '''
    config = ''
    for key, value in six.iteritems(tree):
        config += '{indent}{line}\n'.format(indent=' '*indentation, line=key)
        if value:
            config += _print_config_text(value, indentation=indentation+1)
    return config