function getEffectLog(effect) {
  let data, log

  if(effect.root) {
    data = effect.effect
    log = getLogPrefix('run', effect)
    log.formatter.addCall(data.saga.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.take(effect.effect)) {
    log = getLogPrefix('take', effect)
    log.formatter.addValue(data)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.put(effect.effect)) {
    log = getLogPrefix('put', effect)
    logResult(Object.assign({}, effect, { result: data }), log.formatter)
  }
  else if(data = asEffect.call(effect.effect)) {
    log = getLogPrefix('call', effect)
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.cps(effect.effect)) {
    log = getLogPrefix('cps', effect)
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.fork(effect.effect)) {
    if(!data.detached) {
      log = getLogPrefix('fork', effect)
    } else {
      log = getLogPrefix('spawn', effect)
    }
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.join(effect.effect)) {
    log = getLogPrefix('join', effect)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.race(effect.effect)) {
    log = getLogPrefix('race', effect)
    logResult(effect, log.formatter, true)
  }
  else if(data = asEffect.cancel(effect.effect)) {
    log = getLogPrefix('cancel', effect)
    log.formatter.appendData(data.name)
  }
  else if(data = asEffect.select(effect.effect)) {
    log = getLogPrefix('select', effect)
    log.formatter.addCall(data.selector.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(is.array(effect.effect)) {
    log = getLogPrefix('parallel', effect)
    logResult(effect, log.formatter, true)
  }
  else if(is.iterator(effect.effect)) {
    log = getLogPrefix('', effect)
    log.formatter.addValue(effect.effect.name)
    logResult(effect, log.formatter, true)
  }
  else {
    log = getLogPrefix('unkown', effect)
    logResult(effect, log.formatter)
  }

  return log
}
function getEffectLog(effect) {
  let data, log

  if(effect.root) {
    data = effect.effect
    log = getLogPrefix('run', effect)
    log.formatter.addCall(data.saga.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.take(effect.effect)) {
    log = getLogPrefix('take', effect)
    log.formatter.addValue(data)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.put(effect.effect)) {
    log = getLogPrefix('put', effect)
    logResult(Object.assign({}, effect, { result: data }), log.formatter)
  }
  else if(data = asEffect.call(effect.effect)) {
    log = getLogPrefix('call', effect)
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.cps(effect.effect)) {
    log = getLogPrefix('cps', effect)
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.fork(effect.effect)) {
    if(!data.detached) {
      log = getLogPrefix('fork', effect)
    } else {
      log = getLogPrefix('spawn', effect)
    }
    log.formatter.addCall(data.fn.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.join(effect.effect)) {
    log = getLogPrefix('join', effect)
    logResult(effect, log.formatter)
  }
  else if(data = asEffect.race(effect.effect)) {
    log = getLogPrefix('race', effect)
    logResult(effect, log.formatter, true)
  }
  else if(data = asEffect.cancel(effect.effect)) {
    log = getLogPrefix('cancel', effect)
    log.formatter.appendData(data.name)
  }
  else if(data = asEffect.select(effect.effect)) {
    log = getLogPrefix('select', effect)
    log.formatter.addCall(data.selector.name, data.args)
    logResult(effect, log.formatter)
  }
  else if(is.array(effect.effect)) {
    log = getLogPrefix('parallel', effect)
    logResult(effect, log.formatter, true)
  }
  else if(is.iterator(effect.effect)) {
    log = getLogPrefix('', effect)
    log.formatter.addValue(effect.effect.name)
    logResult(effect, log.formatter, true)
  }
  else {
    log = getLogPrefix('unkown', effect)
    logResult(effect, log.formatter)
  }

  return log
}
function getEffectLog ( effect ) { let data , log if ( effect . root ) { data = effect . effect log = getLogPrefix ( 'run' , effect ) log . formatter . addCall ( data . saga . name , data . args ) logResult ( effect , log . formatter ) } else if ( data = asEffect . take ( effect . effect ) ) { log = getLogPrefix ( 'take' , effect ) log . formatter . addValue ( data ) logResult ( effect , log . formatter ) } else if ( data = asEffect . put ( effect . effect ) ) { log = getLogPrefix ( 'put' , effect ) logResult ( Object . assign ( { } , effect , { result : data } ) , log . formatter ) } else if ( data = asEffect . call ( effect . effect ) ) { log = getLogPrefix ( 'call' , effect ) log . formatter . addCall ( data . fn . name , data . args ) logResult ( effect , log . formatter ) } else if ( data = asEffect . cps ( effect . effect ) ) { log = getLogPrefix ( 'cps' , effect ) log . formatter . addCall ( data . fn . name , data . args ) logResult ( effect , log . formatter ) } else if ( data = asEffect . fork ( effect . effect ) ) { if ( ! data . detached ) { log = getLogPrefix ( 'fork' , effect ) } else { log = getLogPrefix ( 'spawn' , effect ) } log . formatter . addCall ( data . fn . name , data . args ) logResult ( effect , log . formatter ) } else if ( data = asEffect . join ( effect . effect ) ) { log = getLogPrefix ( 'join' , effect ) logResult ( effect , log . formatter ) } else if ( data = asEffect . race ( effect . effect ) ) { log = getLogPrefix ( 'race' , effect ) logResult ( effect , log . formatter , true ) } else if ( data = asEffect . cancel ( effect . effect ) ) { log = getLogPrefix ( 'cancel' , effect ) log . formatter . appendData ( data . name ) } else if ( data = asEffect . select ( effect . effect ) ) { log = getLogPrefix ( 'select' , effect ) log . formatter . addCall ( data . selector . name , data . args ) logResult ( effect , log . formatter ) } else if ( is . array ( effect . effect ) ) { log = getLogPrefix ( 'parallel' , effect ) logResult ( effect , log . formatter , true ) } else if ( is . iterator ( effect . effect ) ) { log = getLogPrefix ( '' , effect ) log . formatter . addValue ( effect . effect . name ) logResult ( effect , log . formatter , true ) } else { log = getLogPrefix ( 'unkown' , effect ) logResult ( effect , log . formatter ) } return log }
/*eslint-disable no-cond-assign
/ * eslint - disable no - cond - assign