Console 类


Console 类可用于创建具有可配置的输出流的简单记录器,可以使用 require('console').Consoleconsole.Console(或其结构化对应物)访问:

const { Console } = require('console');
const { Console } = console;

The Console class can be used to create a simple logger with configurable output streams and can be accessed using either require('console').Console or console.Console (or their destructured counterparts):

const { Console } = require('console');
const { Console } = console;