mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
make lognoquiet and make --quit not print connect/disconnect
This commit is contained in:
parent
e5126fee80
commit
5514c49e39
@ -3,6 +3,9 @@
|
||||
namespace mongo {
|
||||
|
||||
const char * curNs = "in client mode";
|
||||
|
||||
bool quiet = false;
|
||||
|
||||
// Database* database = 0;
|
||||
|
||||
void dbexit(int returnCode, const char *whyMsg ) {
|
||||
|
@ -198,7 +198,7 @@ namespace mongo {
|
||||
m.reset();
|
||||
|
||||
if ( !dbMsgPort.recv(m) ) {
|
||||
log() << "end connection " << dbMsgPort.farEnd.toString() << endl;
|
||||
lognoquiet() << "end connection " << dbMsgPort.farEnd.toString() << endl;
|
||||
dbMsgPort.shutdown();
|
||||
break;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace mongo {
|
||||
const char *curNs = "";
|
||||
Database *database = 0;
|
||||
string ourHostname;
|
||||
|
||||
bool quiet = false;
|
||||
OID serverID;
|
||||
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
namespace mongo {
|
||||
|
||||
extern bool quiet;
|
||||
|
||||
// Utility interface for stringifying object only when val() called.
|
||||
class LazyString {
|
||||
public:
|
||||
@ -182,8 +184,15 @@ namespace mongo {
|
||||
return logstream.prolog();
|
||||
}
|
||||
|
||||
inline Nullstream& lognoquiet(){
|
||||
if ( quiet )
|
||||
return nullstream;
|
||||
return log();
|
||||
}
|
||||
|
||||
inline ostream& stdcout() {
|
||||
return cout;
|
||||
}
|
||||
|
||||
|
||||
} // namespace mongo
|
||||
|
@ -83,7 +83,7 @@ namespace mongo {
|
||||
continue;
|
||||
}
|
||||
disableNagle(s);
|
||||
log() << "connection accepted from " << from.toString() << endl;
|
||||
lognoquiet() << "connection accepted from " << from.toString() << endl;
|
||||
accepted( new MessagingPort(s, from) );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user