【发布时间】:2011-01-21 00:35:08
【问题描述】:
可能是一个愚蠢的问题。尝试使用 Mongo shell。
我想做这样的事情:
matt@linuxvm:~/mongodb-linux-i686-1.2.3/bin$ ./mongo
MongoDB shell version: 1.2.3
url: test
connecting to: test
Thu Feb 25 20:57:47 connection accepted from 127.0.0.1:37987 #3
type "help" for help
> function test() { debug.log("hello") }
> test()
Thu Feb 25 20:58:06 JS Error: ReferenceError: debug is not defined (shell):0
换句话说,在 Mongo shell 中评估 JS 函数时,我如何输出到控制台。我打算使用一些管理/填充脚本来输出一些精细信息。
我试过console.log,debug.log,记录明显的..
【问题讨论】:
标签: mongodb