code: function getLogLevel(level, action, payload, type) {
    switch (typeof level) {
    case 'object':
      return typeof level[type] === 'function' ? level[type](...payload) : level[type]
    case 'function':
      return level(action)
    default:
      return level
    }
  }
docs: parse the level option of createLogger
  
  @property {string | function | object} level - console[level]
  @property {object} action
  @property {array} payload
  @property {string} type