In Bunyan https://github.com/trentm/node-bunyanlogger 我们可以看到这样的日志文件:tail -f sample.log | bunyan
并以彩色显示日志并漂亮地显示 json 对象,但我找不到类似解决方案的想法Winston https://github.com/winstonjs/winston记录器,有人对此有想法吗?
我基于 Bunyan CLI 编写了一个小型 npm 包,用于漂亮地打印 winston 日志,您可以通过以下方式使用它:
npm i -g winston-log-viewer
tail -f logFile.log | winston-log-viewer
Or
tail -f logFile.log | npx winston-log-viewer
https://github.com/mohammadranjbarz/winston-log-viewer https://github.com/mohammadranjbarz/winston-log-viewer
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)