-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.3.2
-
Component/s: Shell
-
None
-
Environment:Confirmed on OS X and Linux 64
-
Major Change
Cannot capture output from print() commands issued to mongo shell when running a script and redirecting stdout to a file. Shell behaves as expected in 2.2.2, but have confirmed the unexpected behavior in 2.3.2, and 2013-01-14 nightly.
$ rm it.log
$ cat it.js
print("Hello");
$ ./mongo --nodb ./it.js 1> it.log
$ cat it.log
MongoDB shell version: 2.3.3-pre-
$ ./mongo --nodb ./it.js
MongoDB shell version: 2.3.3-pre-
Hello
$
- is related to
-
SERVER-8171 Logging to stdout can break in V8
- Closed