Make logger faster
https://mcollina.github.io/the-cost-of-logging/
#31
https://mcollina.github.io/the-cost-of-logging/#41
Secret Sauce(s)
- [ ] Avoid JSON.stringify
- [ ] Date.now() vs new Date().toISOString()
- [ ] %FlattenString (flatstr)
- [ ] fast-safe-stringify
- [ ] quick-format, instead of util.format
https://npm.taobao.org/package/0x
参考 https://github.com/pinojs/pino#benchmarks 来做基准测试
https://github.com/fengmk2/pino/tree/egg-logger-benchmark 增加 egg-logger 测试
util.format 有性能问题 https://npm.taobao.org/package/quick-format
#653 关闭了,我就来这里了,为啥我们用的会是file而不是fileBuffer的形式呢,是因为,文档里好像没有提到buffer这个配置参数,我也是找了半天才看到的
默认是 buffer 啊