diff options
author | Dwight <dmerriman@gmail.com> | 2008-06-06 10:47:39 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-06-06 10:47:39 -0400 |
commit | 6ba343cdf2aac0f7205abe3216fec6b19854370c (patch) | |
tree | 28e5fc716042f6a1dfb6d08ba3a2387afecba2c0 | |
parent | 1625885eb7d094d819eb30e706c5f881cb8bc901 (diff) | |
download | mongo-6ba343cdf2aac0f7205abe3216fec6b19854370c.tar.gz |
log less annoying
-rw-r--r-- | db/db.cpp | 4 | ||||
-rw-r--r-- | stdafx.h | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/db/db.cpp b/db/db.cpp index cd8f9005ede..1b5eb5d5bc2 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -274,7 +274,7 @@ public: }; void listen(int port) { - const char *Version = "db version: 111 6jun2008"; + const char *Version = "db version: 112 6jun2008"; problem() << Version << endl; cout << Version << endl; pdfileInit(); @@ -644,7 +644,7 @@ void initAndListen(int listenPort, const char *dbPath, const char *appserverLoc listen(listenPort); } -ofstream problems("dbproblems.log", ios_base::app | ios_base::out); +//ofstream problems("dbproblems.log", ios_base::app | ios_base::out); int main(int argc, char* argv[], char *envp[] ) { @@ -87,18 +87,19 @@ typedef struct _OWS { char string[400]; } *OWS; -extern ofstream problems; +//extern ofstream problems; class Client; extern Client *client; extern const char *curNs; // not threadsafe -inline ofstream& problem() { +inline ostream& problem() { + ostream& problems = cout; time_t t; time(&t); string now(ctime(&t),0,20); - problems << now; + problems << "problem " << now; if( client ) problems << curNs << ' '; return problems; |