code: function getLogLevel(level, action, payload, type) {
    switch (typeof level === 'undefined' ? 'undefined' : _typeof(level)) {
      case 'object':
        return typeof level[type] === 'function' ? level[type].apply(level, _toConsumableArray(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