summaryrefslogtreecommitdiff
path: root/src/mongo/client/parallel.cpp
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@10gen.com>2012-10-24 10:45:27 -0700
committerShaun Verch <shaun.verch@10gen.com>2012-10-24 12:41:34 -0700
commit892aad0c2fd35985f12b052668f1e37195c17740 (patch)
tree17c9c1d67d9eb57fedadcb0c86337130c0028db7 /src/mongo/client/parallel.cpp
parent0d61667c3870e9d0c9e04bd7475773ad3227e4e8 (diff)
downloadmongo-892aad0c2fd35985f12b052668f1e37195c17740.tar.gz
SERVER-7231 Use LOG(level) macro instead of log(level) function
Diffstat (limited to 'src/mongo/client/parallel.cpp')
-rw-r--r--src/mongo/client/parallel.cpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/mongo/client/parallel.cpp b/src/mongo/client/parallel.cpp
index 9158d3eeced..e6adb49ede1 100644
--- a/src/mongo/client/parallel.cpp
+++ b/src/mongo/client/parallel.cpp
@@ -737,7 +737,7 @@ namespace mongo {
// It's actually okay if we set the version here, since either the
// manager will be verified as compatible, or if the manager doesn't
// exist, we don't care about version consistency
- log( pc ) << "needed to set remote version on connection to value "
+ LOG( pc ) << "needed to set remote version on connection to value "
<< "compatible with " << vinfo << endl;
}
} catch ( const DBException& dbEx ) {
@@ -776,7 +776,7 @@ namespace mongo {
string prefix;
if( _totalTries > 0 ) prefix = str::stream() << "retrying (" << _totalTries << " tries)";
else prefix = "creating";
- log( pc ) << prefix << " pcursor over " << _qSpec << " and " << _cInfo << endl;
+ LOG( pc ) << prefix << " pcursor over " << _qSpec << " and " << _cInfo << endl;
set<Shard> todoStorage;
set<Shard>& todo = todoStorage;
@@ -799,7 +799,8 @@ namespace mongo {
// Close all cursors on extra shards first, as these will be invalid
for( map< Shard, PCMData >::iterator i = _cursorMap.begin(), end = _cursorMap.end(); i != end; ++i ){
- log( pc ) << "closing cursor on shard " << i->first << " as the connection is no longer required by " << vinfo << endl;
+ LOG( pc ) << "closing cursor on shard " << i->first
+ << " as the connection is no longer required by " << vinfo << endl;
// Force total cleanup of these connections
if( todo.find( i->first ) == todo.end() ) i->second.cleanup();
@@ -815,7 +816,8 @@ namespace mongo {
verify( todo.size() );
- log( pc ) << "initializing over " << todo.size() << " shards required by " << vinfo << endl;
+ LOG( pc ) << "initializing over " << todo.size()
+ << " shards required by " << vinfo << endl;
// Don't retry indefinitely for whatever reason
_totalTries++;
@@ -826,7 +828,8 @@ namespace mongo {
const Shard& shard = *i;
PCMData& mdata = _cursorMap[ shard ];
- log( pc ) << "initializing on shard " << shard << ", current connection state is " << mdata.toBSON() << endl;
+ LOG( pc ) << "initializing on shard " << shard
+ << ", current connection state is " << mdata.toBSON() << endl;
// This may be the first time connecting to this shard, if so we can get an error here
try {
@@ -951,8 +954,9 @@ namespace mongo {
}
- log( pc ) << "initialized " << ( isCommand() ? "command " : "query " ) << ( lazyInit ? "(lazily) " : "(full) " ) << "on shard " << shard << ", current connection state is " << mdata.toBSON() << endl;
-
+ LOG( pc ) << "initialized " << ( isCommand() ? "command " : "query " )
+ << ( lazyInit ? "(lazily) " : "(full) " ) << "on shard " << shard
+ << ", current connection state is " << mdata.toBSON() << endl;
}
catch( StaleConfigException& e ){
@@ -967,7 +971,9 @@ namespace mongo {
_markStaleNS( staleNS, e, forceReload, fullReload );
int logLevel = fullReload ? 0 : 1;
- log( pc + logLevel ) << "stale config of ns " << staleNS << " during initialization, will retry with forced : " << forceReload << ", full : " << fullReload << causedBy( e ) << endl;
+ LOG( pc + logLevel ) << "stale config of ns "
+ << staleNS << " during initialization, will retry with forced : "
+ << forceReload << ", full : " << fullReload << causedBy( e ) << endl;
// This is somewhat strange
if( staleNS != ns )
@@ -1044,14 +1050,15 @@ namespace mongo {
bool retry = false;
map< string, StaleConfigException > staleNSExceptions;
- log( pc ) << "finishing over " << _cursorMap.size() << " shards" << endl;
+ LOG( pc ) << "finishing over " << _cursorMap.size() << " shards" << endl;
for( map< Shard, PCMData >::iterator i = _cursorMap.begin(), end = _cursorMap.end(); i != end; ++i ){
const Shard& shard = i->first;
PCMData& mdata = i->second;
- log( pc ) << "finishing on shard " << shard << ", current connection state is " << mdata.toBSON() << endl;
+ LOG( pc ) << "finishing on shard " << shard
+ << ", current connection state is " << mdata.toBSON() << endl;
// Ignore empty conns for now
if( ! mdata.pcState ) continue;
@@ -1102,7 +1109,8 @@ namespace mongo {
// Finalize state
state->cursor->attach( state->conn.get() ); // Closes connection for us
- log( pc ) << "finished on shard " << shard << ", current connection state is " << mdata.toBSON() << endl;
+ LOG( pc ) << "finished on shard " << shard
+ << ", current connection state is " << mdata.toBSON() << endl;
}
}
catch( RecvStaleConfigException& e ){
@@ -1160,7 +1168,9 @@ namespace mongo {
_markStaleNS( staleNS, exception, forceReload, fullReload );
int logLevel = fullReload ? 0 : 1;
- log( pc + logLevel ) << "stale config of ns " << staleNS << " on finishing query, will retry with forced : " << forceReload << ", full : " << fullReload << causedBy( exception ) << endl;
+ LOG( pc + logLevel ) << "stale config of ns "
+ << staleNS << " on finishing query, will retry with forced : "
+ << forceReload << ", full : " << fullReload << causedBy( exception ) << endl;
// This is somewhat strange
if( staleNS != ns )