1log 中文文档教程
这个库提供了一个函数 log
,可以用作常规的 console.log
,但有两个超能力:您可以将它插入到任何表达式中,如 f(log(x))
中,并且它支持插件。 有用于设置严重级别、用于记录函数、异步函数、promises、iterables、async iterables、observables、用于在 Jest 测试中创建日志消息快照等的插件。
请参阅 GitHub README 以获取完整文档和屏幕截图。
This library provides a function log
that can be used as the regular console.log
, but has two superpowers: you can insert it into any expression, as in f(log(x))
, and it supports plugins. There are plugins for setting severity level, for logging functions, async functions, promises, iterables, async iterables, observables, for creating snapshots of log messages in Jest tests, and more.
Please refer to the GitHub README for full documentation and screenshots.