diff options
author | dwight <dwight@Dwights-MacBook.local> | 2008-08-02 17:02:41 -0400 |
---|---|---|
committer | dwight <dwight@Dwights-MacBook.local> | 2008-08-02 17:02:41 -0400 |
commit | 112b19a5d9f7682a869a66c5c6da333f8bdb7c94 (patch) | |
tree | 7df336f8426ae22c0320a7e09148908c54edcb46 /util | |
parent | bc24777c118e6d84f14c71a9f5e310623e7551fa (diff) | |
download | mongo-112b19a5d9f7682a869a66c5c6da333f8bdb7c94.tar.gz |
log cleanup
Diffstat (limited to 'util')
-rw-r--r-- | util/mmap.cpp | 14 | ||||
-rw-r--r-- | util/sock.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/util/mmap.cpp b/util/mmap.cpp index 94f96d6fa59..a3296cd2412 100644 --- a/util/mmap.cpp +++ b/util/mmap.cpp @@ -148,14 +148,14 @@ void* MemoryMappedFile::map(const char *filename, int length) { /* make sure the file is the full desired length */ off_t filelen = lseek(fd, 0, SEEK_END); if( filelen < length ) { - cout << "map: file length=" << (unsigned) filelen << " want:"; - cout << length; - cout << endl; + log() << "map: file length=" << (unsigned) filelen << " want:" + << length + << endl; if( filelen != 0 ) { - cout << " failing mapping" << endl; + log() << " failing mapping" << endl; return 0; } - cout << " writing file to full length with zeroes..." << endl; + log() << " writing file to full length with zeroes..." << endl; int z = 8192; char buf[z]; memset(buf, 0, z); @@ -168,7 +168,7 @@ void* MemoryMappedFile::map(const char *filename, int length) { write(fd, buf, z); left -= z; } - cout << " done" << endl; + log() << " done" << endl; } lseek(fd, length, SEEK_SET); @@ -184,7 +184,7 @@ void* MemoryMappedFile::map(const char *filename, int length) { void MemoryMappedFile::flush(bool sync) { if( msync(view, len, sync ? MS_SYNC : MS_ASYNC) ) - cout << "msync error " << errno << endl; + problem() << "msync error " << errno << endl; } #endif diff --git a/util/sock.h b/util/sock.h index 1840c3fc10f..58913027fcd 100644 --- a/util/sock.h +++ b/util/sock.h @@ -62,7 +62,7 @@ inline void disableNagle(int sock) { } inline void prebindOptions( int sock ){ - log() << "doing prebind option" << endl; + DEV log() << "doing prebind option" << endl; int x = 1; if ( setsockopt( sock , SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x)) < 0 ) cout << "Failed to set socket opt, SO_REUSEADDR" << endl; |