summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2008-07-28 13:51:39 -0400
committerDwight <dmerriman@gmail.com>2008-07-28 13:51:39 -0400
commit3363fe311c4d2b4638b234ef58a96659e0e3266f (patch)
tree0ca721ff7841ac35089f2a02dadd426d87983a97 /util
parent9249a94423da8621e03aa5385df67a84c661de6b (diff)
downloadmongo-3363fe311c4d2b4638b234ef58a96659e0e3266f.tar.gz
collection options are retained when db is cloned;
those options now listed in system.namespaces; more repl work
Diffstat (limited to 'util')
-rw-r--r--util/log.h12
-rw-r--r--util/sock.h1
2 files changed, 6 insertions, 7 deletions
diff --git a/util/log.h b/util/log.h
index 286d956ebb3..78be6e28b1b 100644
--- a/util/log.h
+++ b/util/log.h
@@ -51,21 +51,21 @@ public:
Logstream& operator<<(const string& x) LOGIT
Logstream& operator<< (ostream& ( *_endl )(ostream&)) { lock lk(mutex); cout << _endl; return *this; }
Logstream& operator<< (ios_base& (*_hex)(ios_base&)) { lock lk(mutex); cout << _hex; return *this; }
- Logstream& prolog() {
+ Logstream& prolog(bool withNs = false) {
lock lk(mutex);
time_t t;
time(&t);
string now(ctime(&t),0,20);
- cout << "~ " << now;
- if( client )
+ cout << now;
+ if( withNs && client )
cout << curNs << ' ';
return *this;
}
};
-inline Logstream& endl ( Logstream& os ) { }
+inline Logstream& endl ( Logstream& os ) { return os; }
extern Logstream logstream;
-// not threadsafe
-inline Logstream& problem() { return logstream.prolog(); }
+inline Logstream& problem() { return logstream.prolog(true); }
+inline Logstream& log() { return logstream.prolog(); }
#define cout logstream
diff --git a/util/sock.h b/util/sock.h
index 46179449464..1e101b619ac 100644
--- a/util/sock.h
+++ b/util/sock.h
@@ -178,7 +178,6 @@ inline SockAddr::SockAddr(int sourcePort) {
}
inline SockAddr::SockAddr(const char *ip, int port) {
- cout << "TEMP port:" << port << endl;
memset(sa.sin_zero, 0, sizeof(sa.sin_zero));
sa.sin_family = AF_INET;
sa.sin_port = htons(port);