0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

log nicer repl

This commit is contained in:
Dwight 2010-03-08 13:56:55 -05:00
parent fed38a9805
commit d22498af7a

View File

@ -1430,8 +1430,14 @@ namespace mongo {
bool ReplSource::sync(int& nApplied) {
_sleepAdviceTime = 0;
ReplInfo r("sync");
if ( !cmdLine.quiet )
log() << "repl: " << sourceName() << '@' << hostName << endl;
if ( !cmdLine.quiet ) {
Nullstream& l = log();
l << "repl: from ";
if( sourceName() != "main" ) {
l << "source:" << sourceName() << ' ';
}
l << "host:" << hostName << endl;
}
nClonedThisPass = 0;
// FIXME Handle cases where this db isn't on default port, or default port is spec'd in hostName.