egg icon indicating copy to clipboard operation
egg copied to clipboard

升级 debug 写法

Open fengmk2 opened this issue 3 years ago • 0 comments

请详细告知你的新解决思路(Your new RFCs):

debug 模块我们一直在使用,过去几年有过多次的 major 版本更新,在 v2 v3 v4 之间都有混用。 随着 node util 的 debuglog 已经比较稳定和完善,计划在接下来逐步将 debug 使用 util.debuglog 代替。

const debug = require('util').debuglog('egg:{moduleName}:{featureName}');

跟进类型(Follow-up Types):

  • [X] 这是某个任务
  • [ ] 这是一个具体的 PR 的地址(URL) https://github.com/eggjs/egg-mock/pull/139

fengmk2 avatar Dec 11 '22 09:12 fengmk2