【发布时间】:2015-12-24 15:34:49
【问题描述】:
节点console.log(object)的最新版本返回:
{ top:
{ child:
{ anotherChild: 'someValue' } } }
如何让它返回一个更传统的:
{
top: {
child: {
anotherChild: 'someValue'
}
}
}
谢谢!
【问题讨论】:
-
您尝试过类似
util.inspect的方法吗? nodejs.org/api/util.html
标签: node.js logging formatting parentheses