call-seq:
    loggers( ary )

 Given an array of Logger configurations, this method will iterate over
 each and create the Logger(s).
337163
def loggers( ary )
      return if ary.nil?

      ary.each do |config|
        name = config['name']
        raise Error, 'Logger name not given' if name.nil?

        l = Logsly::Logging182::Logger.new name
        l.level = config['level'] if config.has_key?('level')
        l.additive = config['additive'] if l.respond_to? :additive=
        l.trace = config['trace'] if l.respond_to? :trace=

        if config.has_key?('appenders')
          l.appenders = config['appenders'].map {|n| ::Logsly::Logging182::Appenders[n]}
        end
      end
    end
390043
def build_logger_tree():
    
    cache = {}
    tree = make_logger_node("", root)
    for name, logger in sorted(root.manager.loggerDict.items()):
        if "." in name:
            parent_name = ".".join(name.split(".")[:-1])
            parent = cache[parent_name]
        else:
            parent = tree

        cache[name] = make_logger_node(name, logger, parent)
    return tree
834716
public static LogRecord create(SitLogger logger, ElementPosition position, TestStep testStep,
            MessagePattern pattern, Object... params) {

        Object[] newParams = new Object[] { testStep.getItemName(), testStep.getLocator() };
        newParams = ArrayUtils.addAll(newParams, params);

        return create(logger, position, testStep, pattern.getPattern(), newParams);
    }
482872
def logger_add (self, loggerclass):
        """"""
        self.loggers[loggerclass.LoggerName] = loggerclass
        self[loggerclass.LoggerName] = {}
569932
def setup_logging():
    
    global console_handler

    # make sure logging is setup only once
    if console_handler:
        return

    # set the handler of the law root logger
    console_handler = logging.StreamHandler()
    console_handler.setFormatter(LogFormatter())
    logging.getLogger("law").addHandler(console_handler)

    # set levels for all loggers
    for name, level in Config.instance().items("logging"):
        level = level.upper()
        if hasattr(logging, level):
            logger = logging.getLogger(name)
            logger.setLevel(getattr(logging, level))
            logger.debug("registered logger with level '{}'".format(level))
1146909
def build_flask_like_logger(
    logger_name='logger',
    log_level=None,
    log_dir=None,
    console_enabled=True,
    max_log_size=5*1024*1024,
    max_backup_logs=5,
    host=None):
    '''
    
    '''
    old_logger_class = logging.getLoggerClass()
    logging.setLoggerClass(FlaskLikeLogger)
    logger = logging.getLogger(logger_name)
    logging.setLoggerClass(old_logger_class)

    if log_level:
        logger.setLevel(log_level)
    if host:
        logger.set_host(host)
    logger.apply_default_handlers(log_dir, console_enabled, max_log_size, max_backup_logs)
    return logger
982197
function createLoggers(ns) {
  var debug = (0, _debug2['default'])(ns + ':debug');
  debug.log = function () {
    return console.log.apply(console, arguments);
  };

  var log = (0, _debug2['default'])(ns + ':log');
  log.log = function () {
    return console.log.apply(console, arguments);
  };

  var info = (0, _debug2['default'])(ns + ':info');
  info.log = function () {
    return console.info.apply(console, arguments);
  };

  var warn = (0, _debug2['default'])(ns + ':warn');
  warn.log = function () {
    return console.warn.apply(console, arguments);
  };

  var error = (0, _debug2['default'])(ns + ':error');
  error.log = function () {
    return console.error.apply(console, arguments);
  };

  return {
    debug: debug,
    log: log,
    info: info,
    warn: warn,
    error: error
  };
}
891894
def init_logger(log_requests=False):
    

    logger = logging.getLogger(__name__.split(".")[0])
    for handler in logger.handlers:  # pragma: nocover
        logger.removeHandler(handler)

    formatter = coloredlogs.ColoredFormatter(fmt="%(asctime)s: %(message)s")
    handler = logging.StreamHandler()
    handler.setLevel(logging.DEBUG)
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.setLevel(logging.DEBUG)
    logger.propagate = False

    if log_requests:
        requests.packages.urllib3.add_stderr_logger()
656897
def init_log(*handlers, **kwargs):
    
    disable_existing_loggers = kwargs.get('disable_existing_loggers', False)

    handlers_config = [t.get_handler() for t in handlers]
    new_handlers_config = {}
    for t in handlers_config:
        new_handlers_config.update(t)

    formatter_config = [t.get_formatter() for t in handlers]
    new_formatter_config = {}
    for t in formatter_config:
        new_formatter_config.update(t)

    handler_name_list = [t.get_formatter_name() for t in handlers]
    dict_config = {
        'version': 1,
        'disable_existing_loggers': disable_existing_loggers,
        'formatters': new_formatter_config,
        'handlers': new_handlers_config,
        'loggers': {
            '': {
                'handlers': handler_name_list,
                'level': 'DEBUG',
            }
        }
    }

    logging.config.dictConfig(dict_config)
1222278
function Logger(pipeline, suppressErrors) {
        this.suppressErrors = true;
        this.pipeline = pipeline;
        this.suppressErrors = typeof suppressErrors === 'undefined' || suppressErrors;
    }
361250
def build_default_logger(
    logger_name='logger',
    log_level=None,
    log_dir=None,
    console_enabled=True,
    max_log_size=5*1024*1024,
    max_backup_logs=5):
    '''
    
    '''
    old_logger_class = logging.getLoggerClass()
    logging.setLoggerClass(DefaultLogger)
    logger = logging.getLogger(logger_name)
    logging.setLoggerClass(old_logger_class)

    if log_level:
        logger.setLevel(log_level)
    logger.apply_default_handlers(log_dir, console_enabled, max_log_size, max_backup_logs)
    return logger
611449
def set_loggers_from_config(config=None):
    
    config = config or app_config.logging
    for lname, lconfig in config.get('loggers', {}).iteritems():
        if 'level' in lconfig:
            level = getattr(logging, lconfig.level)
            assert isinstance(level, int)
            logger = logging.getLogger(lname)
            logger.setLevel(level)
799637
function createLogger (config) {
  config = config || {}
  let level
  if (process.env.KOOP_LOG_LEVEL) {
    level = process.env.KOOP_LOG_LEVEL
  } else if (process.env.NODE_ENV === 'production') {
    level = 'info'
  } else {
    level = 'debug'
  }

  if (!config.logfile) {
    // no logfile defined, log to STDOUT an STDERRv
    const debugConsole = new winston.transports.Console({
      colorize: process.env.NODE_ENV === 'production',
      level,
      stringify: true,
      json: true
    })
    return new winston.Logger({ transports: [debugConsole] })
  }

  // we need a dir to do log rotation so we get the dir from the file
  const logpath = path.dirname(config.logfile)
  const logAll = new winston.transports.File({
    filename: config.logfile,
    name: 'log.all',
    dirname: logpath,
    colorize: true,
    json: false,
    level,
    formatter: formatter
  })
  const logError = new winston.transports.File({
    filename: config.logfile.replace('.log', '.error.log'),
    name: 'log.error',
    dirname: logpath,
    colorize: true,
    json: false,
    level: 'error',
    formatter: formatter
  })

  // always log errors
  const transports = [logError]
  // only log everthing if debug mode is on
  if (process.env['LOG_LEVEL'] === 'debug') {
    transports.push(logAll)
  }

  return new winston.Logger({ transports })
}
49343
function LoggerConfiguration(logger) {
  /**
   * Override default logger instance with the provided logger
   * @public
   * @param {Object|Function} loggerOrFactoryFunction - the logger instance or factory function
   */
  function useLogger(loggerOrFactoryFunction) {
    cutil.assertObjectOrFunction(loggerOrFactoryFunction, 'loggerOrFactoryFunction');

    if (typeof(loggerOrFactoryFunction) === 'function') {
      logger = loggerOrFactoryFunction();
    }
    else {
      logger = loggerOrFactoryFunction;
    }
  };

  /**
   * Gets the default or overridden logger
   * @public
   */
  function getParams() {
    return { logger };
  }

  return {
    /**
     * Gets the target for a configurator function to run on
     * @public
     */
    getTarget: function() {
      return { useLogger: useLogger };
    },
    getParams: getParams
  };
}
464478
def setup_logging(args):
    
    loglevel = logging.WARNING
    if args.verbose:
        loglevel = logging.INFO
    if args.debug:
        loglevel = logging.DEBUG

    console = logging.StreamHandler()
    logging.getLogger('').setLevel(loglevel)
    console.setFormatter(logging.Formatter(LOG_FORMAT))
    logging.getLogger('').addHandler(console)
1060054
private static Logger getOrCreateLogger(final String name) {
		if (name == null || name.length() == 0) {
			return root;
		} else {
			Logger logger = loggers.get(name);
			if (logger == null) {
				Logger parent = getOrCreateLogger(reduce(name));
				logger = new Logger(parent, name);
				loggers.put(name, logger);
			}
			return logger;
		}
	}
963476
def logging_list_loggers(**kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('logging:list_loggers', **{
        'logging_service': ctx.repo.create_secure_service('logging'),
    })