src/log.js
function addAdapter (state, name, config, logger) {
  if (_.isFunction(name)) {
    logger = name
    name = logger.name
    config = config || {}
  } else if (_.isFunction(config)) {
    logger = config
    if (_.isObject(name)) {
      config = name
      name = logger.name
    } else {
      config = {}
    }
  } else if (_.isObject(name)) {
    logger = name
    name = logger.name
    config = config || {}
  } else if (config && config.fatal) {
    logger = config
    config = {}
  }
  addLogger(state, name, config, logger)
}
function addAdapter (state, name, config, logger) {
  if (_.isFunction(name)) {
    logger = name
    name = logger.name
    config = config || {}
  } else if (_.isFunction(config)) {
    logger = config
    if (_.isObject(name)) {
      config = name
      name = logger.name
    } else {
      config = {}
    }
  } else if (_.isObject(name)) {
    logger = name
    name = logger.name
    config = config || {}
  } else if (config && config.fatal) {
    logger = config
    config = {}
  }
  addLogger(state, name, config, logger)
}
function addAdapter ( state , name , config , logger ) { if ( _ . isFunction ( name ) ) { logger = name name = logger . name config = config || { } } else if ( _ . isFunction ( config ) ) { logger = config if ( _ . isObject ( name ) ) { config = name name = logger . name } else { config = { } } } else if ( _ . isObject ( name ) ) { logger = name name = logger . name config = config || { } } else if ( config && config . fatal ) { logger = config config = { } } addLogger ( state , name , config , logger ) }
normalizes arguments for logger creation from a user supplied object or function
normalizes arguments for logger creation from a user supplied object or function