code: function onload(app, options) {
      ctx.app = app;
      ctx.options = options || {};
  
      const config = app.c();
      options.logDir = options.logDir || path.join(process.cwd(), 'logs');
      ensureLogDir(options.logDir);
      
      const transports = options.transports || [
          new winston.transports.Console({
              humanReadableUnhandledException: true,
              colorize: true,
              json: false
          }),
          new winston.transports.File({
              filename: path.join(options.logDir, 'error.log'),
              level: 'error',
              colorize: true,
              maxsize: 20971520, // 20M
              maxFiles: 5
          }),
          new winston.transports.File({
              filename: path.join(options.logDir, 'combined.log'),
              colorize: true,
              maxsize: 52428800, // 50M
              maxFiles: 5
          })
      ];
      const exceptionHandlers = options.exceptionHandlers || [
          new winston.transports.File({
              filename: path.join(options.logDir, 'exceptions.log'),
              colorize: true,
              maxsize: 20971520, // 20M
              maxFiles: 5
          }),
      ];
      const formatter = (typeof options.formatter === 'function') ? options.formatter :
          info => `${new Date(info.timestamp).toLocaleString()} [${info.label}] ${info.level}: ${info.message}`;
      const opts = options.logOpts || {
          level: 'info',
          format: combine(
              label({ label: config.name || 'ibird' }),
              timestamp(),
              printf(formatter)
          ),
          transports,
          exceptionHandlers
      };
      const logger = winston.createLogger(opts);
      app.config({ logger });
      Object.assign(api, {
          error: logger.error.bind(logger),
          warn: logger.warn.bind(logger),
          info: logger.info.bind(logger),
          verbose: logger.verbose.bind(logger),
          debug: logger.debug.bind(logger),
          silly: logger.silly.bind(logger)
      });
  }
docs: 加载插件
  @param app
  @param options