message: feat(core): api.logger
diff: -import { lodash } from '@umijs/utils';
  +import { chalk, lodash, logger } from '@umijs/utils';
  import assert from 'assert';
  import { EnableBy, IPluginConfig, PluginType, ServiceStage } from '../types';
  import { Command, IOpts as ICommandOpts } from './command';
  @@ -8,14 +8,33 @@ import { Plugin } from './plugin';
  import { Service } from './service';
  import { makeArray } from './utils';
  +type Logger = typeof logger;
  +
  export class PluginAPI {
  service: Service;
  plugin: Plugin;
  + logger: Logger;
  constructor(opts: { service: Service; plugin: Plugin }) {
  this.service = opts.service;
  this.plugin = opts.plugin;
  - // TODO
  // logger
  + const loggerKeys: (keyof Logger)[] = [
  + 'wait',
  + 'error',
  + 'warn',
  + 'ready',
  + 'info',
  + 'event',
  + ];
  + // @ts-ignore
  + this.logger = loggerKeys.reduce<Logger>((memo, key) => {
  + // @ts-ignore
  + memo[key] = (...message: string[]) => {
  + // @ts-ignore
  + logger[key](chalk.green(`[plugin: ${this.plugin.id}]`), ...message);
  + };
  + return memo;
  + }, {} as any);
  }
  describe(opts: {
  