summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-08-08 17:37:04 -0400
committerMathias Stearn <mathias@10gen.com>2011-08-08 19:52:56 -0400
commit0e20be567e38e835d8a2df17ba030391bbbb00ee (patch)
tree856d6403d5011aa6a9e9bacaa6e3f8c0ad8a5120
parent0045301af9f756c6ef6de83373e502c1fa281a88 (diff)
downloadmongo-0e20be567e38e835d8a2df17ba030391bbbb00ee.tar.gz
use LOG(x) everywhere in mongos
-rw-r--r--s/balance.cpp18
-rw-r--r--s/balancer_policy.cpp8
-rw-r--r--s/chunk.cpp24
-rw-r--r--s/commands_public.cpp2
-rw-r--r--s/config.cpp18
-rw-r--r--s/cursors.cpp2
-rw-r--r--s/d_logic.cpp8
-rw-r--r--s/d_migrate.cpp4
-rw-r--r--s/d_split.cpp2
-rw-r--r--s/d_state.cpp4
-rw-r--r--s/d_writeback.cpp2
-rw-r--r--s/grid.cpp2
-rw-r--r--s/request.cpp2
-rw-r--r--s/shard.cpp4
-rw-r--r--s/shardkey.cpp2
-rw-r--r--s/strategy_shard.cpp18
-rw-r--r--s/strategy_single.cpp6
-rw-r--r--s/writeback_listener.cpp2
18 files changed, 64 insertions, 64 deletions
diff --git a/s/balance.cpp b/s/balance.cpp
index da25f3362c2..0cb39ad038d 100644
--- a/s/balance.cpp
+++ b/s/balance.cpp
@@ -155,7 +155,7 @@ namespace mongo {
cursor.reset();
if ( collections.empty() ) {
- log(1) << "no collections to balance" << endl;
+ LOG(1) << "no collections to balance" << endl;
return;
}
@@ -170,7 +170,7 @@ namespace mongo {
vector<Shard> allShards;
Shard::getAllShards( allShards );
if ( allShards.size() < 2) {
- log(1) << "can't balance without more active shards" << endl;
+ LOG(1) << "can't balance without more active shards" << endl;
return;
}
@@ -205,7 +205,7 @@ namespace mongo {
cursor.reset();
if (shardToChunksMap.empty()) {
- log(1) << "skipping empty collection (" << ns << ")";
+ LOG(1) << "skipping empty collection (" << ns << ")";
continue;
}
@@ -282,7 +282,7 @@ namespace mongo {
// now make sure we should even be running
if ( ! grid.shouldBalance() ) {
- log(1) << "skipping balancing round because balancing is disabled" << endl;
+ LOG(1) << "skipping balancing round because balancing is disabled" << endl;
conn.done();
sleepsecs( 30 );
@@ -297,25 +297,25 @@ namespace mongo {
{
dist_lock_try lk( &balanceLock , "doing balance round" );
if ( ! lk.got() ) {
- log(1) << "skipping balancing round because another balancer is active" << endl;
+ LOG(1) << "skipping balancing round because another balancer is active" << endl;
conn.done();
sleepsecs( 30 ); // no need to wake up soon
continue;
}
- log(1) << "*** start balancing round" << endl;
+ LOG(1) << "*** start balancing round" << endl;
vector<CandidateChunkPtr> candidateChunks;
_doBalanceRound( conn.conn() , &candidateChunks );
if ( candidateChunks.size() == 0 ) {
- log(1) << "no need to move any chunk" << endl;
+ LOG(1) << "no need to move any chunk" << endl;
}
else {
_balancedLastTime = _moveChunks( &candidateChunks );
}
- log(1) << "*** end of balancing round" << endl;
+ LOG(1) << "*** end of balancing round" << endl;
}
conn.done();
@@ -326,7 +326,7 @@ namespace mongo {
log() << "caught exception while doing balance: " << e.what() << endl;
// Just to match the opening statement if in log level 1
- log(1) << "*** End of balancing round" << endl;
+ LOG(1) << "*** End of balancing round" << endl;
sleepsecs( 30 ); // sleep a fair amount b/c of error
continue;
diff --git a/s/balancer_policy.cpp b/s/balancer_policy.cpp
index efb0fb924af..f1b4bf14db1 100644
--- a/s/balancer_policy.cpp
+++ b/s/balancer_policy.cpp
@@ -96,13 +96,13 @@ namespace mongo {
return NULL;
}
- log(1) << "collection : " << ns << endl;
- log(1) << "donor : " << max.second << " chunks on " << max.first << endl;
- log(1) << "receiver : " << min.second << " chunks on " << min.first << endl;
+ LOG(1) << "collection : " << ns << endl;
+ LOG(1) << "donor : " << max.second << " chunks on " << max.first << endl;
+ LOG(1) << "receiver : " << min.second << " chunks on " << min.first << endl;
if ( ! drainingShards.empty() ) {
string drainingStr;
joinStringDelim( drainingShards, &drainingStr, ',' );
- log(1) << "draining : " << ! drainingShards.empty() << "(" << drainingShards.size() << ")" << endl;
+ LOG(1) << "draining : " << ! drainingShards.empty() << "(" << drainingShards.size() << ")" << endl;
}
// Solving imbalances takes a higher priority than draining shards. Many shards can
diff --git a/s/chunk.cpp b/s/chunk.cpp
index 6a195d8d25d..09dc994d961 100644
--- a/s/chunk.cpp
+++ b/s/chunk.cpp
@@ -208,7 +208,7 @@ namespace mongo {
// no split points means there isn't enough data to split on
// 1 split point means we have between half the chunk size to full chunk size
// so we shouldn't split
- log(1) << "chunk not full enough to trigger auto-split" << endl;
+ LOG(1) << "chunk not full enough to trigger auto-split" << endl;
return BSONObj();
}
@@ -350,7 +350,7 @@ namespace mongo {
// this was implicit before since we did a splitVector on the same socket
ShardConnection::sync();
- log(1) << "about to initiate autosplit: " << *this << " dataWritten: " << _dataWritten << " splitThreshold: " << splitThreshold << endl;
+ LOG(1) << "about to initiate autosplit: " << *this << " dataWritten: " << _dataWritten << " splitThreshold: " << splitThreshold << endl;
_dataWritten = 0; // reset so we check often enough
@@ -378,7 +378,7 @@ namespace mongo {
Shard newLocation = Shard::pick( getShard() );
if ( getShard() == newLocation ) {
// if this is the best shard, then we shouldn't do anything (Shard::pick already logged our shard).
- log(1) << "recently split chunk: " << range << " already in the best shard: " << getShard() << endl;
+ LOG(1) << "recently split chunk: " << range << " already in the best shard: " << getShard() << endl;
return true; // we did split even if we didn't migrate
}
@@ -386,7 +386,7 @@ namespace mongo {
ChunkPtr toMove = cm->findChunk(min);
if ( ! (toMove->getMin() == min && toMove->getMax() == max) ){
- log(1) << "recently split chunk: " << range << " modified before we could migrate " << toMove << endl;
+ LOG(1) << "recently split chunk: " << range << " modified before we could migrate " << toMove << endl;
return true;
}
@@ -793,7 +793,7 @@ namespace mongo {
set<Shard> seen;
- log(1) << "ChunkManager::drop : " << _ns << endl;
+ LOG(1) << "ChunkManager::drop : " << _ns << endl;
// lock all shards so no one can do a split/migrate
for ( ChunkMap::const_iterator i=_chunkMap.begin(); i!=_chunkMap.end(); ++i ) {
@@ -801,7 +801,7 @@ namespace mongo {
seen.insert( c->getShard() );
}
- log(1) << "ChunkManager::drop : " << _ns << "\t all locked" << endl;
+ LOG(1) << "ChunkManager::drop : " << _ns << "\t all locked" << endl;
// delete data from mongod
for ( set<Shard>::iterator i=seen.begin(); i!=seen.end(); i++ ) {
@@ -810,13 +810,13 @@ namespace mongo {
conn.done();
}
- log(1) << "ChunkManager::drop : " << _ns << "\t removed shard data" << endl;
+ LOG(1) << "ChunkManager::drop : " << _ns << "\t removed shard data" << endl;
// remove chunk data
ScopedDbConnection conn( configServer.modelServer() );
conn->remove( Chunk::chunkMetadataNS , BSON( "ns" << _ns ) );
conn.done();
- log(1) << "ChunkManager::drop : " << _ns << "\t removed chunk data" << endl;
+ LOG(1) << "ChunkManager::drop : " << _ns << "\t removed chunk data" << endl;
for ( set<Shard>::iterator i=seen.begin(); i!=seen.end(); i++ ) {
ScopedDbConnection conn( *i );
@@ -832,7 +832,7 @@ namespace mongo {
conn.done();
}
- log(1) << "ChunkManager::drop : " << _ns << "\t DONE" << endl;
+ LOG(1) << "ChunkManager::drop : " << _ns << "\t DONE" << endl;
configServer.logChange( "dropCollection" , _ns , BSONObj() );
}
@@ -843,7 +843,7 @@ namespace mongo {
vector<BSONObj> splitPoints;
soleChunk->pickSplitVector( splitPoints , Chunk::MaxChunkSize );
if ( splitPoints.empty() ) {
- log(1) << "not enough data to warrant chunking " << getns() << endl;
+ LOG(1) << "not enough data to warrant chunking " << getns() << endl;
return;
}
@@ -985,7 +985,7 @@ namespace mongo {
void run() {
runShardChunkVersion();
- log(1) << "shardObjTest passed" << endl;
+ LOG(1) << "shardObjTest passed" << endl;
}
} shardObjTest;
@@ -1010,7 +1010,7 @@ namespace mongo {
cmdBuilder.append( "shardHost" , s.getConnString() );
BSONObj cmd = cmdBuilder.obj();
- log(1) << " setShardVersion " << s.getName() << " " << conn.getServerAddress() << " " << ns << " " << cmd << " " << &conn << endl;
+ LOG(1) << " setShardVersion " << s.getName() << " " << conn.getServerAddress() << " " << ns << " " << cmd << " " << &conn << endl;
return conn.runCommand( "admin" , cmd , result );
}
diff --git a/s/commands_public.cpp b/s/commands_public.cpp
index 82bd689577f..eb19ef68fc3 100644
--- a/s/commands_public.cpp
+++ b/s/commands_public.cpp
@@ -1110,7 +1110,7 @@ namespace mongo {
mr_shard::Config config( dbName , cmdObj );
mr_shard::State state(config);
- log(1) << "mr sharded output ns: " << config.ns << endl;
+ LOG(1) << "mr sharded output ns: " << config.ns << endl;
if (config.outType == mr_shard::Config::INMEMORY) {
errmsg = "This Map Reduce mode is not supported with sharded output";
diff --git a/s/config.cpp b/s/config.cpp
index 07da064fa6f..ab840f47f07 100644
--- a/s/config.cpp
+++ b/s/config.cpp
@@ -268,7 +268,7 @@ namespace mongo {
}
void DBConfig::unserialize(const BSONObj& from) {
- log(1) << "DBConfig unserialize: " << _name << " " << from << endl;
+ LOG(1) << "DBConfig unserialize: " << _name << " " << from << endl;
assert( _name == from["_id"].String() );
_shardingEnabled = from.getBoolField("partitioned");
@@ -369,7 +369,7 @@ namespace mongo {
// 1
if ( ! configServer.allUp( errmsg ) ) {
- log(1) << "\t DBConfig::dropDatabase not all up" << endl;
+ LOG(1) << "\t DBConfig::dropDatabase not all up" << endl;
return 0;
}
@@ -392,7 +392,7 @@ namespace mongo {
log() << "error removing from config server even after checking!" << endl;
return 0;
}
- log(1) << "\t removed entry from config server for: " << _name << endl;
+ LOG(1) << "\t removed entry from config server for: " << _name << endl;
set<Shard> allServers;
@@ -428,7 +428,7 @@ namespace mongo {
conn.done();
}
- log(1) << "\t dropped primary db for: " << _name << endl;
+ LOG(1) << "\t dropped primary db for: " << _name << endl;
configServer.logChange( "dropDatabase" , _name , BSONObj() );
return true;
@@ -453,7 +453,7 @@ namespace mongo {
}
seen.insert( i->first );
- log(1) << "\t dropping sharded collection: " << i->first << endl;
+ LOG(1) << "\t dropping sharded collection: " << i->first << endl;
i->second.getCM()->getAllShards( allServers );
i->second.getCM()->drop( i->second.getCM() );
@@ -461,7 +461,7 @@ namespace mongo {
num++;
uassert( 10184 , "_dropShardedCollections too many collections - bailing" , num < 100000 );
- log(2) << "\t\t dropped " << num << " so far" << endl;
+ LOG(2) << "\t\t dropped " << num << " so far" << endl;
}
return true;
@@ -528,7 +528,7 @@ namespace mongo {
string fullString;
joinStringDelim( configHosts, &fullString, ',' );
_primary.setAddress( ConnectionString( fullString , ConnectionString::SYNC ) );
- log(1) << " config string : " << fullString << endl;
+ LOG(1) << " config string : " << fullString << endl;
return true;
}
@@ -672,7 +672,7 @@ namespace mongo {
string name = o["_id"].valuestrsafe();
got.insert( name );
if ( name == "chunksize" ) {
- log(1) << "MaxChunkSize: " << o["value"] << endl;
+ LOG(1) << "MaxChunkSize: " << o["value"] << endl;
Chunk::MaxChunkSize = o["value"].numberInt() * 1024 * 1024;
}
else if ( name == "balancer" ) {
@@ -746,7 +746,7 @@ namespace mongo {
conn->createCollection( "config.changelog" , 1024 * 1024 * 10 , true );
}
catch ( UserException& e ) {
- log(1) << "couldn't create changelog (like race condition): " << e << endl;
+ LOG(1) << "couldn't create changelog (like race condition): " << e << endl;
// don't care
}
createdCapped = true;
diff --git a/s/cursors.cpp b/s/cursors.cpp
index c3f772d501e..e8aeffb1cb4 100644
--- a/s/cursors.cpp
+++ b/s/cursors.cpp
@@ -112,7 +112,7 @@ namespace mongo {
}
bool hasMore = sendMore && _cursor->more();
- log(6) << "\t hasMore:" << hasMore << " wouldSendMoreIfHad: " << sendMore << " id:" << getId() << " totalSent: " << _totalSent << endl;
+ LOG(6) << "\t hasMore:" << hasMore << " wouldSendMoreIfHad: " << sendMore << " id:" << getId() << " totalSent: " << _totalSent << endl;
replyToQuery( 0 , r.p() , r.m() , b.buf() , b.len() , num , _totalSent , hasMore ? getId() : 0 );
_totalSent += num;
diff --git a/s/d_logic.cpp b/s/d_logic.cpp
index 5216b2e52ca..9d4fd74dd62 100644
--- a/s/d_logic.cpp
+++ b/s/d_logic.cpp
@@ -60,7 +60,7 @@ namespace mongo {
return false;
}
- log(1) << "connection meta data too old - will retry ns:(" << ns << ") op:(" << opToString(op) << ") " << errmsg << endl;
+ LOG(1) << "connection meta data too old - will retry ns:(" << ns << ") op:(" << opToString(op) << ") " << errmsg << endl;
if ( doesOpGetAResponse( op ) ) {
assert( dbresponse );
@@ -97,8 +97,8 @@ namespace mongo {
const OID& clientID = ShardedConnectionInfo::get(false)->getID();
massert( 10422 , "write with bad shard config and no server id!" , clientID.isSet() );
- log(1) << "got write with an old config - writing back ns: " << ns << endl;
- if ( logLevel ) log(1) << m.toString() << endl;
+ LOG(1) << "got write with an old config - writing back ns: " << ns << endl;
+ if ( logLevel ) LOG(1) << m.toString() << endl;
BSONObjBuilder b;
b.appendBool( "writeBack" , true );
@@ -109,7 +109,7 @@ namespace mongo {
b.appendTimestamp( "version" , shardingState.getVersion( ns ) );
b.appendTimestamp( "yourVersion" , ShardedConnectionInfo::get( true )->getVersion( ns ) );
b.appendBinData( "msg" , m.header()->len , bdtCustom , (char*)(m.singleData()) );
- log(2) << "writing back msg with len: " << m.header()->len << " op: " << m.operation() << endl;
+ LOG(2) << "writing back msg with len: " << m.header()->len << " op: " << m.operation() << endl;
writeBackManager.queueWriteBack( clientID.str() , b.obj() );
return true;
diff --git a/s/d_migrate.cpp b/s/d_migrate.cpp
index 8149a00ceab..e24a02d3538 100644
--- a/s/d_migrate.cpp
+++ b/s/d_migrate.cpp
@@ -1079,7 +1079,7 @@ namespace mongo {
preCond.done();
BSONObj cmd = cmdBuilder.obj();
- log(7) << "moveChunk update: " << cmd << migrateLog;
+ LOG(7) << "moveChunk update: " << cmd << migrateLog;
bool ok = false;
BSONObj cmdResult;
@@ -1679,7 +1679,7 @@ namespace mongo {
assert( ! isInRange( BSON( "x" << 5 ) , min , max ) );
assert( ! isInRange( BSON( "x" << 6 ) , min , max ) );
- log(1) << "isInRangeTest passed" << migrateLog;
+ LOG(1) << "isInRangeTest passed" << migrateLog;
}
} isInRangeTest;
}
diff --git a/s/d_split.cpp b/s/d_split.cpp
index 6bf9c4e0a6a..cef6188a2bb 100644
--- a/s/d_split.cpp
+++ b/s/d_split.cpp
@@ -691,7 +691,7 @@ namespace mongo {
BSONObjBuilder logDetail;
origChunk.appendShortVersion( "before" , logDetail );
- log(1) << "before split on " << origChunk << endl;
+ LOG(1) << "before split on " << origChunk << endl;
vector<ChunkInfo> newChunks;
ShardChunkVersion myVersion = maxVersion;
diff --git a/s/d_state.cpp b/s/d_state.cpp
index 764e976c1ea..f43865b222e 100644
--- a/s/d_state.cpp
+++ b/s/d_state.cpp
@@ -288,7 +288,7 @@ namespace mongo {
ShardedConnectionInfo* ShardedConnectionInfo::get( bool create ) {
ShardedConnectionInfo* info = _tl.get();
if ( ! info && create ) {
- log(1) << "entering shard mode for connection" << endl;
+ LOG(1) << "entering shard mode for connection" << endl;
info = new ShardedConnectionInfo();
_tl.reset( info );
}
@@ -316,7 +316,7 @@ namespace mongo {
void ShardedConnectionInfo::addHook() {
static bool done = false;
if (!done) {
- log(1) << "adding sharding hook" << endl;
+ LOG(1) << "adding sharding hook" << endl;
pool.addHook(new ShardingConnectionHook(false));
done = true;
}
diff --git a/s/d_writeback.cpp b/s/d_writeback.cpp
index 42c6588495b..01c0c14ac0a 100644
--- a/s/d_writeback.cpp
+++ b/s/d_writeback.cpp
@@ -144,7 +144,7 @@ namespace mongo {
// we want to do return at least at every 5 minutes so sockets don't timeout
BSONObj z;
if ( writeBackManager.getWritebackQueue(id.str())->queue.blockingPop( z, 5 * 60 /* 5 minutes */ ) ) {
- log(1) << "WriteBackCommand got : " << z << endl;
+ LOG(1) << "WriteBackCommand got : " << z << endl;
result.append( "data" , z );
}
else {
diff --git a/s/grid.cpp b/s/grid.cpp
index 97a04a6dc49..3756e131a6a 100644
--- a/s/grid.cpp
+++ b/s/grid.cpp
@@ -513,7 +513,7 @@ namespace mongo {
assert( Grid::_inBalancingWindow( w8 , now ) );
assert( Grid::_inBalancingWindow( w9 , now ) );
- log(1) << "BalancingWidowObjTest passed" << endl;
+ LOG(1) << "BalancingWidowObjTest passed" << endl;
}
} BalancingWindowObjTest;
diff --git a/s/request.cpp b/s/request.cpp
index da9424a1de3..2dc0beca4b5 100644
--- a/s/request.cpp
+++ b/s/request.cpp
@@ -111,7 +111,7 @@ namespace mongo {
}
- log(3) << "Request::process ns: " << getns() << " msg id:" << (int)(_m.header()->id) << " attempt: " << attempt << endl;
+ LOG(3) << "Request::process ns: " << getns() << " msg id:" << (int)(_m.header()->id) << " attempt: " << attempt << endl;
Strategy * s = SINGLE;
_counter = &opsNonSharded;
diff --git a/s/shard.cpp b/s/shard.cpp
index c4f2028eebd..75326e047fc 100644
--- a/s/shard.cpp
+++ b/s/shard.cpp
@@ -346,7 +346,7 @@ namespace mongo {
best = t;
}
- log(1) << "best shard for new allocation is " << best << endl;
+ LOG(1) << "best shard for new allocation is " << best << endl;
return best.shard();
}
@@ -360,7 +360,7 @@ namespace mongo {
void ShardingConnectionHook::onCreate( DBClientBase * conn ) {
if( !noauth ) {
string err;
- log(2) << "calling onCreate auth for " << conn->toString() << endl;
+ LOG(2) << "calling onCreate auth for " << conn->toString() << endl;
uassert( 15847, "can't authenticate to shard server",
conn->auth("local", internalSecurity.user, internalSecurity.pwd, err, false));
}
diff --git a/s/shardkey.cpp b/s/shardkey.cpp
index 49458f2d7c7..9c19b990cf7 100644
--- a/s/shardkey.cpp
+++ b/s/shardkey.cpp
@@ -264,7 +264,7 @@ namespace mongo {
moveToFrontBenchmark(100);
}
- log(1) << "shardKeyTest passed" << endl;
+ LOG(1) << "shardKeyTest passed" << endl;
}
} shardKeyTest;
diff --git a/s/strategy_shard.cpp b/s/strategy_shard.cpp
index 92f57195c92..eb990eb5334 100644
--- a/s/strategy_shard.cpp
+++ b/s/strategy_shard.cpp
@@ -37,7 +37,7 @@ namespace mongo {
r.checkAuth();
- log(3) << "shard query: " << q.ns << " " << q.query << endl;
+ LOG(3) << "shard query: " << q.ns << " " << q.query << endl;
if ( q.ntoreturn == 1 && strstr(q.ns, ".$cmd") )
throw UserException( 8010 , "something is wrong, shouldn't see a command here" );
@@ -75,7 +75,7 @@ namespace mongo {
try {
cursor->init();
- log(5) << " cursor type: " << cursor->type() << endl;
+ LOG(5) << " cursor type: " << cursor->type() << endl;
shardedCursorTypes.hit( cursor->type() );
if ( query.isExplain() ) {
@@ -94,7 +94,7 @@ namespace mongo {
if ( ! cc->sendNextBatch( r ) ) {
return;
}
- log(6) << "storing cursor : " << cc->getId() << endl;
+ LOG(6) << "storing cursor : " << cc->getId() << endl;
cursorCache.store( cc );
}
@@ -102,11 +102,11 @@ namespace mongo {
int ntoreturn = r.d().pullInt();
long long id = r.d().pullInt64();
- log(6) << "want cursor : " << id << endl;
+ LOG(6) << "want cursor : " << id << endl;
ShardedClientCursorPtr cursor = cursorCache.get( id );
if ( ! cursor ) {
- log(6) << "\t invalid cursor :(" << endl;
+ LOG(6) << "\t invalid cursor :(" << endl;
replyToQuery( ResultFlag_CursorNotFound , r.p() , r.m() , 0 , 0 , 0 );
return;
}
@@ -156,7 +156,7 @@ namespace mongo {
for ( int i=0; i<maxTries; i++ ) {
try {
ChunkPtr c = manager->findChunk( o );
- log(4) << " server:" << c->getShard().toString() << " " << o << endl;
+ LOG(4) << " server:" << c->getShard().toString() << " " << o << endl;
insert( c->getShard() , r.getns() , o , flags);
r.gotInsert();
@@ -224,7 +224,7 @@ namespace mongo {
for ( int i=0; i<maxTries; i++ ) {
try {
ChunkPtr c = manager->findChunk( o );
- log(4) << " server:" << c->getShard().toString() << " " << o << endl;
+ LOG(4) << " server:" << c->getShard().toString() << " " << o << endl;
insert( c->getShard() , ns , o , flags, safe);
break;
}
@@ -450,7 +450,7 @@ namespace mongo {
while ( true ) {
try {
manager->getShardsForQuery( shards , pattern );
- log(2) << "delete : " << pattern << " \t " << shards.size() << " justOne: " << justOne << endl;
+ LOG(2) << "delete : " << pattern << " \t " << shards.size() << " justOne: " << justOne << endl;
if ( shards.size() == 1 ) {
doWrite( dbDelete , r , *shards.begin() );
return;
@@ -482,7 +482,7 @@ namespace mongo {
virtual void writeOp( int op , Request& r ) {
const char *ns = r.getns();
- log(3) << "write: " << ns << endl;
+ LOG(3) << "write: " << ns << endl;
DbMessage& d = r.d();
ChunkManagerPtr info = r.getChunkManager();
diff --git a/s/strategy_single.cpp b/s/strategy_single.cpp
index fac21895a4c..012be5fb3dd 100644
--- a/s/strategy_single.cpp
+++ b/s/strategy_single.cpp
@@ -36,7 +36,7 @@ namespace mongo {
virtual void queryOp( Request& r ) {
QueryMessage q( r.d() );
- log(3) << "single query: " << q.ns << " " << q.query << " ntoreturn: " << q.ntoreturn << " options : " << q.queryOptions << endl;
+ LOG(3) << "single query: " << q.ns << " " << q.query << " ntoreturn: " << q.ntoreturn << " options : " << q.queryOptions << endl;
if ( r.isCommand() ) {
@@ -161,12 +161,12 @@ namespace mongo {
if ( r.isShardingEnabled() &&
strstr( ns , ".system.indexes" ) == strchr( ns , '.' ) &&
strchr( ns , '.' ) ) {
- log(1) << " .system.indexes write for: " << ns << endl;
+ LOG(1) << " .system.indexes write for: " << ns << endl;
handleIndexWrite( op , r );
return;
}
- log(3) << "single write: " << ns << endl;
+ LOG(3) << "single write: " << ns << endl;
doWrite( op , r , r.primaryShard() );
r.gotInsert(); // Won't handle mulit-insert correctly. Not worth parsing the request.
}
diff --git a/s/writeback_listener.cpp b/s/writeback_listener.cpp
index 81f75988a6e..98058b7dd9b 100644
--- a/s/writeback_listener.cpp
+++ b/s/writeback_listener.cpp
@@ -117,7 +117,7 @@ namespace mongo {
while ( ! inShutdown() ) {
if ( ! Shard::isAShardNode( _addr ) ) {
- log(1) << _addr << " is not a shard node" << endl;
+ LOG(1) << _addr << " is not a shard node" << endl;
sleepsecs( 60 );
continue;
}