src/log.js
function addLogger (state, name, config, adapter) {
  config = Object.assign({}, defaultConfig, config)
  setFilters(config)
  const logger = {
    name: name,
    config: config,
    adapter: adapter,
    addFilter: addFilter.bind(null, config),
    removeFilter: removeFilter.bind(null, config),
    setFilter: setFilter.bind(null, config),
    setFilters: setFilters.bind(null, config)
  }
  if (config.namespaceInit) {
    logger.init = memoize(adapter)
  }
  logger.log = onEntry.bind(null, logger)
  state.loggers[ name ] = logger
}
function addLogger (state, name, config, adapter) {
  config = Object.assign({}, defaultConfig, config)
  setFilters(config)
  const logger = {
    name: name,
    config: config,
    adapter: adapter,
    addFilter: addFilter.bind(null, config),
    removeFilter: removeFilter.bind(null, config),
    setFilter: setFilter.bind(null, config),
    setFilters: setFilters.bind(null, config)
  }
  if (config.namespaceInit) {
    logger.init = memoize(adapter)
  }
  logger.log = onEntry.bind(null, logger)
  state.loggers[ name ] = logger
}
function addLogger ( state , name , config , adapter ) { config = Object . assign ( { } , defaultConfig , config ) setFilters ( config ) const logger = { name : name , config : config , adapter : adapter , addFilter : addFilter . bind ( null , config ) , removeFilter : removeFilter . bind ( null , config ) , setFilter : setFilter . bind ( null , config ) , setFilters : setFilters . bind ( null , config ) } if ( config . namespaceInit ) { logger . init = memoize ( adapter ) } logger . log = onEntry . bind ( null , logger ) state . loggers [ name ] = logger }
creates a logger from a user supplied adapter
creates a logger from a user supplied adapter