Function genCustomConsole

  • EN: Custom console printing (console).

    ZH: 生成自定义控制台打印。

    Usage:

    const myConsole = genCustomConsole('MazeyLog:');
    myConsole.log('I am string.');
    myConsole.info('I am boolean.', true);
    myConsole.info('I am number.', 123, 456);
    myConsole.info('I am object.', { a: 123, b: 456});

    Output:

    MazeyLog: I am string.
    MazeyLog: I am boolean. true
    MazeyLog: I am number. 123 456
    MazeyLog: I am object. {a: 123, b: 456}
    

    Parameters

    • prefix: string = ""

      前缀

    • options: {
          errorFn?: (() => void);
          isClosed?: boolean;
          locales?: string;
          logFn?: (() => void);
          showDate?: boolean;
          showWrap?: boolean;
      } = ...
      • Optional errorFn?: (() => void)
          • (): void
          • Returns void

      • Optional isClosed?: boolean
      • Optional locales?: string
      • Optional logFn?: (() => void)
          • (): void
          • Returns void

      • Optional showDate?: boolean
      • Optional showWrap?: boolean

    Returns Console

    新实例