diff options
Diffstat (limited to 'jstests/core/loglong.js')
-rw-r--r-- | jstests/core/loglong.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/jstests/core/loglong.js b/jstests/core/loglong.js index 0a8889c2b25..0447d915d10 100644 --- a/jstests/core/loglong.js +++ b/jstests/core/loglong.js @@ -4,26 +4,28 @@ t = db.loglong; t.drop(); -t.insert( { x : 1 } ); +t.insert({x: 1}); n = 0; -query = { x : [] }; -while ( Object.bsonsize( query ) < 30000 ) { - query.x.push( n++ ); +query = { + x: [] +}; +while (Object.bsonsize(query) < 30000) { + query.x.push(n++); } -before = db.adminCommand( { setParameter : 1 , logLevel : 1 } ); +before = db.adminCommand({setParameter: 1, logLevel: 1}); -t.findOne( query ); +t.findOne(query); -x = db.adminCommand( { setParameter : 1 , logLevel : before.was } ); -assert.eq( 1 , x.was , tojson( x ) ); +x = db.adminCommand({setParameter: 1, logLevel: before.was}); +assert.eq(1, x.was, tojson(x)); -log = db.adminCommand( { getLog : "global" } ).log; +log = db.adminCommand({getLog: "global"}).log; found = false; -for ( i=log.length - 1; i>= 0; i-- ) { - if ( log[i].indexOf( "warning: log line attempted (16kB)" ) >= 0 ) { +for (i = log.length - 1; i >= 0; i--) { + if (log[i].indexOf("warning: log line attempted (16kB)") >= 0) { found = true; break; } |