code: function log (type) {
    return (...message) => {
      if (!message.length) {
        return
      }
  
      const { colorFn, icon } = getColorFnAndIconByType(type)
      const output = ['']
  
      message.forEach((item, index) => {
        if (index === 0) {
          output.push(`  ${icon} ${item}`)
          return
        }
  
        output.push(`    ${item}`)
      })
  
      output.push('')
  
      console.log(colorFn(output.join('\n')))
    }
  }
docs: 构造日志函数
  
  @param {string} type 日志类型
  @returns {function} log function