summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl.cpp')
-rw-r--r--src/mongo/db/repl.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/db/repl.cpp b/src/mongo/db/repl.cpp
index cd5b56e44ee..3b372b951d3 100644
--- a/src/mongo/db/repl.cpp
+++ b/src/mongo/db/repl.cpp
@@ -336,7 +336,7 @@ namespace mongo {
BSONObj pattern = b.done();
BSONObj o = jsobj();
- log( 1 ) << "Saving repl source: " << o << endl;
+ LOG( 1 ) << "Saving repl source: " << o << endl;
{
OpDebug debug;
@@ -649,7 +649,7 @@ namespace mongo {
*/
void ReplSource::sync_pullOpLog_applyOperation(BSONObj& op, bool alreadyLocked) {
if( logLevel >= 6 ) // op.tostring is expensive so doing this check explicitly
- log(6) << "processing op: " << op << endl;
+ LOG(6) << "processing op: " << op << endl;
if( op.getStringField("op")[0] == 'n' )
return;
@@ -731,7 +731,7 @@ namespace mongo {
bool incompleteClone = incompleteCloneDbs.count( clientName ) != 0;
if( logLevel >= 6 )
- log(6) << "ns: " << ns << ", justCreated: " << ctx.justCreated() << ", empty: " << empty << ", incompleteClone: " << incompleteClone << endl;
+ LOG(6) << "ns: " << ns << ", justCreated: " << ctx.justCreated() << ", empty: " << empty << ", incompleteClone: " << incompleteClone << endl;
// always apply admin command command
// this is a bit hacky -- the semantics of replication/commands aren't well specified
@@ -795,7 +795,7 @@ namespace mongo {
int ReplSource::sync_pullOpLog(int& nApplied) {
int okResultCode = 1;
string ns = string("local.oplog.$") + sourceName();
- log(2) << "repl: sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
+ LOG(2) << "repl: sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
bool tailing = true;
oplogReader.tailCheck();
@@ -818,7 +818,7 @@ namespace mongo {
if ( !e.embeddedObject().getBoolField( "empty" ) ) {
if ( name != "local" ) {
if ( only.empty() || only == name ) {
- log( 2 ) << "adding to 'addDbNextPass': " << name << endl;
+ LOG( 2 ) << "adding to 'addDbNextPass': " << name << endl;
addDbNextPass.insert( name );
}
}
@@ -846,7 +846,7 @@ namespace mongo {
tailing = false;
}
else {
- log(2) << "repl: tailing=true\n";
+ LOG(2) << "repl: tailing=true\n";
}
if( !oplogReader.haveCursor() ) {
@@ -869,7 +869,7 @@ namespace mongo {
if ( !oplogReader.more() ) {
if ( tailing ) {
- log(2) << "repl: tailing & no new activity\n";
+ LOG(2) << "repl: tailing & no new activity\n";
if( oplogReader.awaitCapable() )
okResultCode = 0; // don't sleep
@@ -908,9 +908,9 @@ namespace mongo {
}
nextOpTime = OpTime( ts.date() );
- log(2) << "repl: first op time received: " << nextOpTime.toString() << '\n';
+ LOG(2) << "repl: first op time received: " << nextOpTime.toString() << '\n';
if ( initial ) {
- log(1) << "repl: initial run\n";
+ LOG(1) << "repl: initial run\n";
}
if( tailing ) {
if( !( syncedTo < nextOpTime ) ) {
@@ -1127,7 +1127,7 @@ namespace mongo {
BSONObj res;
bool ok = conn->runCommand( "admin" , cmd.obj() , res );
// ignoring for now on purpose for older versions
- log(ok) << "replHandshake res not: " << ok << " res: " << res << endl;
+ LOG(ok) << "replHandshake res not: " << ok << " res: " << res << endl;
return true;
}
@@ -1233,7 +1233,7 @@ namespace mongo {
}
if ( !oplogReader.connect(hostName) ) {
- log(4) << "repl: can't connect to sync source" << endl;
+ LOG(4) << "repl: can't connect to sync source" << endl;
return -1;
}
@@ -1413,7 +1413,7 @@ namespace mongo {
}
}
else {
- log(5) << "couldn't logKeepalive" << endl;
+ LOG(5) << "couldn't logKeepalive" << endl;
toSleep = 1;
}
}
@@ -1484,12 +1484,12 @@ namespace mongo {
if ( replSettings.slave ) {
verify( replSettings.slave == SimpleSlave );
- log(1) << "slave=true" << endl;
+ LOG(1) << "slave=true" << endl;
boost::thread repl_thread(replSlaveThread);
}
if ( replSettings.master ) {
- log(1) << "master=true" << endl;
+ LOG(1) << "master=true" << endl;
replSettings.master = true;
createOplog();
boost::thread t(replMasterThread);