code: function setup (level, colors, appenders) {
    // Turn color on/off on the console appenders with pattern layout
    const pattern = colors ? constant.COLOR_PATTERN : constant.NO_COLOR_PATTERN
    if (appenders) {
      // Convert Array to Object for backwards compatibility.
      if (appenders['map']) {
        if (appenders.length === 0) {
          appenders = [constant.CONSOLE_APPENDER]
        }
        const v1Appenders = appenders
        appenders = {}
        v1Appenders.forEach(function (appender, index) {
          if (appender.type === 'console') {
            appenders['console'] = appender
            if (helper.isDefined(appender.layout) && appender.layout.type === 'pattern') {
              appender.layout.pattern = pattern
            }
          } else {
            appenders[index + ''] = appender
          }
          return appender
        })
      }
    } else {
      appenders = {'console': constant.CONSOLE_APPENDER}
    }
  
    log4js.configure({
      appenders: appenders,
      categories: {
        'default': {
          'appenders': Object.keys(appenders),
          'level': level
        }
      }
    })
  }
docs: Setup the logger by passing in the configuration options. It needs three arguments:  setup(logLevel, colors, appenders)  * `logLevel`: *String* Defines the global log level. * `colors`: *Boolean* Use colors in the stdout or not. * `appenders`: *Object*  This will be passed as appenders to log4js to allow for fine grained configuration of log4js. For more information see https://github.com/nomiddlename/log4js-node. *Array* is also accepted for backwards compatibility.