export default (logLevel) => {
  const levels = {
    trace: 1,
    debug: 2,
    info: 3,
    warn: 4,
    error: 5,
    none: 100
  }

  const expectedWeight = Object.keys(levels).find(x => x === logLevel.toLowerCase())

  const canPrint = lvl => {
    const levelWeight = Object.keys(levels).find(x => x === lvl.toLowerCase())
    return levelWeight >= expectedWeight
  }

  return {
    trace: x => canPrint('trace') && console.trace(x),
    debug: x => canPrint('debug') && console.log(x),
    info: x => canPrint('info') && console.info(x),
    warn: x => canPrint('warn') && console.warn(x),
    error: x => canPrint('error') && console.error(x)
  }
}

@@ -142,237 +142,57 @@
 nst 
-expectedWeight = Object.keys(levels).find(x =%3E x === logLevel.toLowerCase())%0A%0A  const canPrint = lvl =%3E %7B%0A    const levelWeight = Object.keys(levels).find(x =%3E x === lvl.toLowerCase())%0A    return levelWeight %3E= expectedWeight%0A  %7D
+canPrint = lvl =%3E levels%5Blvl%5D %3E= levels%5BlogLevel%5D
 %0A%0A  

fix logger