simple-log-tee:同时记录和写入多个流

时间:2021-07-05 12:20:00
【文件属性】:
文件名称:simple-log-tee:同时记录和写入多个流
文件大小:5KB
文件格式:ZIP
更新时间:2021-07-05 12:20:00
JavaScript 简单日志 T 恤 同时记录和写入多个流。 这对于同时将输出记录到控制台和文件非常方便。 用法 var stee = require ( 'simple-log-tee' ) ; var doubleStd = stee . createLogTee ( [ process . stdout , process . stderr ] ) ; doubleStd . log ( 'Double the fun?' ) ; doubleStd . write ( ' ... ' ) ; doubleStd . log ( 'Maybe not.' ) ; stee . teeToStdoutOnly ( ) . log ( 'That\'s better.' ) ; stee . teeToNowhere ( ) . write ( 'But this is going nowhere!'
【文件预览】:
simple-log-tee-master
----index.js(473B)
----package.json(629B)
----tests()
--------manual.js(732B)
----LICENSE(759B)
----.gitignore(587B)
----lib()
--------LogTee.js(712B)
--------LogFileTee.js(874B)
----README.md(1KB)

网友评论