var config = require('./config')

module.exports = {
  log: function (message, data) {
    var isDebugMode = config.get('debug') == 'true'
    var hasConsole = window.console


    if (isDebugMode && hasConsole) {
      window.console.log(message, data)
    }

  }
}

var config = require('./config')

var logStack = []

module.exports = {
  log: function (message, data) {
    var isDebugMode = config.get('debug') == 'true'
    var hasConsole = window.console

    logStack.push({
      msg: message,
      data: data
    })

    if (isDebugMode && hasConsole) {
      window.console.log(message, data)
    }

  }
}

Add internal logstack in logger