Console 类
Console
类可用于创建具有可配置输出流的简单记录器,并可使用 require('console').Console
或 console.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;