summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-07-25 11:51:34 -0400
committerEliot Horowitz <eliot@10gen.com>2010-07-25 11:51:34 -0400
commit4e4a4959a8f2388af94b222128e09da68129111d (patch)
tree3bb5271b9989e89cd1b1f5c83d8ca8cc3cb267d9 /scripting
parent672a947cf5cac8774ba744248c39b9dfef51fa0d (diff)
downloadmongo-4e4a4959a8f2388af94b222128e09da68129111d.tar.gz
some log cleaning
Diffstat (limited to 'scripting')
-rw-r--r--scripting/engine.cpp4
-rw-r--r--scripting/engine_spidermonkey.cpp8
2 files changed, 7 insertions, 5 deletions
diff --git a/scripting/engine.cpp b/scripting/engine.cpp
index 305f3fe2592..7b47a0fb2d1 100644
--- a/scripting/engine.cpp
+++ b/scripting/engine.cpp
@@ -96,7 +96,7 @@ namespace mongo {
path p( filename );
if ( ! exists( p ) ){
- cout << "file [" << filename << "] doesn't exist" << endl;
+ log() << "file [" << filename << "] doesn't exist" << endl;
if ( assertOnError )
assert( 0 );
return false;
@@ -116,7 +116,7 @@ namespace mongo {
}
if (empty){
- cout << "directory [" << filename << "] doesn't have any *.js files" << endl;
+ log() << "directory [" << filename << "] doesn't have any *.js files" << endl;
if ( assertOnError )
assert( 0 );
return false;
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp
index effe006c957..fc60f13affb 100644
--- a/scripting/engine_spidermonkey.cpp
+++ b/scripting/engine_spidermonkey.cpp
@@ -887,13 +887,15 @@ namespace mongo {
// --- global helpers ---
JSBool native_print( JSContext * cx , JSObject * obj , uintN argc, jsval *argv, jsval *rval ){
+ stringstream ss;
Convertor c( cx );
for ( uintN i=0; i<argc; i++ ){
if ( i > 0 )
- cout << " ";
- cout << c.toString( argv[i] );
+ ss << " ";
+ ss << c.toString( argv[i] );
}
- cout << endl;
+ ss << "\n";
+ Logstream::logLockless( ss.str() );
return JS_TRUE;
}