Log the current logging configuration.
761015
def log_config(self):
        '''  '''
        level = self.level
        debug = self.debug
        debug('Logging config:')
        debug('/ name: {}, id: {}', self.name, id(self))
        debug('  .level: %s (%s)', level_map_int[level], level)
        debug('  .default_level: %s (%s)',
                   level_map_int[self.default_level], self.default_level)

        for i, handler in enumerate(self.handlers):
            fmtr = handler.formatter
            debug('  + Handler: %s %r', i, handler)
            debug('    + Formatter: %r', fmtr)
            debug('      .datefmt: %r', fmtr.datefmt)
            debug('      .msgfmt: %r', fmtr._fmt)
            debug('      fmt_style: %r', fmtr._style)
            try:
                debug('      theme styles: %r', fmtr._theme_style)
                debug('      theme icons:\n%r', fmtr._theme_icons)
                debug('      lexer: %r\n', fmtr._lexer)
            except AttributeError:
                pass
1061192
def config():
    ''''''
    if hasattr(current_app, 'settings_file'):
        log.info('Loaded configuration from %s', current_app.settings_file)

    log.info(white('Current configuration'))
    for key in sorted(current_app.config):
        if key.startswith('__') or not key.isupper():
            continue
        echo('{0}: {1}'.format(white(key), current_app.config[key]))
884736
def showLogging(debug=False):
    

    try:
        log_level = logging.WARN
        log_format = LOG_FORMAT_DEBUG
        if debug:
            log_level = logging.DEBUG
        logging.basicConfig(
            level=log_level,
            format=log_format)
    except:
        logging.basicConfig()
977998
def patch_logging(self):
        """"""
        if not hasattr(logging, "getLogger"):
            def getLogger(name=None):
                other = Logger(self)
                if name is not None:
                    other.name = name
                return other
            logging.getLogger = getLogger
890147
def log(*args, level=INFO):
    
    Logger.CURRENT.log(*args, level=level)
643799
def log(*args, **attrs):
    """"""
    attrs.setdefault("metavar", "PATH")
    attrs.setdefault("show_default", False)
    return option(log, *args, **attrs)
949349
def log_starting(self):
		""""""
		self.start_time = time.perf_counter()
		logger.log("Starting '", logger.cyan(self.name), "'...")
1323229
public static void configureNoLogging() {
    final Logger rootLogger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    final LoggerContext context = rootLogger.getLoggerContext();

    // Clear context, removing all appenders
    context.reset();

    // Set logging level to OFF
    for (final Logger logger : context.getLoggerList()) {
      if (logger != rootLogger) {
        logger.setLevel(null);
      }
    }
    rootLogger.setLevel(OFF);
  }
600350
def stdout_logging(loglevel=logging.INFO):
    
    logformat = "[%(asctime)s] %(levelname)s:%(name)s:%(lineno)d: %(message)s"

    logging.config.dictConfig(level=loglevel, stream=sys.stdout,
                              format=logformat, datefmt="%Y-%m-%d %H:%M:%S")
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)
303966
def _configure_logging(self):
        
        if not self.LOGGING_CONFIG:
            #Fallback to default logging in global settings if needed
            dictConfig(self.DEFAULT_LOGGING)
        else:
            dictConfig(self.LOGGING_CONFIG)
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)
693658
def setup_logging(log_level=logging.INFO):
    """"""
    logging.basicConfig(level=log_level)
    fmt = ("%(asctime)s %(levelname)s (%(threadName)s) "
           "[%(name)s] %(message)s")
    colorfmt = "%(log_color)s{}%(reset)s".format(fmt)
    datefmt = '%Y-%m-%d %H:%M:%S'

    # Suppress overly verbose logs from libraries that aren't helpful
    logging.getLogger('requests').setLevel(logging.WARNING)

    try:
        from colorlog import ColoredFormatter
        logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
            colorfmt,
            datefmt=datefmt,
            reset=True,
            log_colors={
                'DEBUG': 'cyan',
                'INFO': 'green',
                'WARNING': 'yellow',
                'ERROR': 'red',
                'CRITICAL': 'red',
            }
        ))
    except ImportError:
        pass

    logger = logging.getLogger('')
    logger.setLevel(log_level)
473869
def configure_logging():
    

    if not parse_boolean(os.environ.get('DISABLE_TRUSTAR_LOGGING')):

        # configure
        dictConfig(DEFAULT_LOGGING_CONFIG)

        # construct error logger
        error_logger = logging.getLogger("error")

        # log all uncaught exceptions
        def log_exception(exc_type, exc_value, exc_traceback):
            error_logger.error("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback))

        # register logging function as exception hook
        sys.excepthook = log_exception
445784
public synchronized void logConfigReport() {
    ConfigStatus reportStatus = mConfigCheckReport.getConfigStatus();
    if (reportStatus.equals(ConfigStatus.PASSED)) {
      LOG.info(CONSISTENT_CONFIGURATION_INFO);
    } else if (reportStatus.equals(ConfigStatus.WARN)) {
      LOG.warn("{}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
          mConfigCheckReport.getConfigWarns().values().stream()
              .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
    } else {
      LOG.error("{}\nErrors: {}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
          mConfigCheckReport.getConfigErrors().values().stream()
              .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")),
          mConfigCheckReport.getConfigWarns().values().stream()
              .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
    }
  }
437113
def setup_logging():
    """"""
    config = json.load(open(os.path.join(config_path, 'logging.json')))

    # If syslogging is disabled, set the pipeline handler to NullHandler
    if dbconfig.get('enable_syslog_forwarding', NS_LOG, False):
        try:
            config['formatters']['syslog'] = {
                'format': _get_syslog_format('cloud-inquisitor-logs')
            }

            config['handlers']['syslog'] = {
                'class': 'cloud_inquisitor.log.SyslogPipelineHandler',
                'formatter': 'syslog',
                'filters': ['standard']
            }

            config['loggers']['cloud_inquisitor']['handlers'].append('syslog')

            # Configure the audit log handler
            audit_handler = SyslogPipelineHandler()
            audit_handler.setFormatter(logging.Formatter(_get_syslog_format('cloud-inquisitor-audit')))
            audit_handler.setLevel(logging.DEBUG)

            _AUDIT_LOGGER.addHandler(audit_handler)
            _AUDIT_LOGGER.propagate = False
        except Exception as ex:
            print('An error occured while configuring the syslogger: {}'.format(ex))

    logging.config.dictConfig(config)
363297
def setup_logging(self):
        """"""
        is_custom_logging = len(self.options.logging_config) > 0
        is_custom_logging = is_custom_logging and os.path.isfile(self.options.logging_config)
        is_custom_logging = is_custom_logging and not self.options.dry_run

        if is_custom_logging:
            Logger.configure_by_file(self.options.logging_config)
        else:
            logging_format = "%(asctime)-15s - %(name)s - %(message)s"
            if self.options.dry_run:
                logging_format = "%(name)s - %(message)s"
            Logger.configure_default(logging_format, self.logging_level)