What is the difference between util.error and console.error in Node.js?

前端 未结 2 1349
醉酒成梦
醉酒成梦 2021-02-07 11:46

What exactly is the difference between the util.error([...]) and console.error([...])?

In both of the methods it prints to stderr.

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 12:26

    Just in case anyone comes across this question again, util.error is DEPRECATED so stick to console.error!

提交回复
热议问题