summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-08-26 12:18:03 -0400
committerEliot Horowitz <eliot@10gen.com>2010-09-15 14:41:05 -0400
commit4c677b4759a289c22b6b945d8b1d9ad65d3face2 (patch)
tree149d3ee440b4b418b0a6831f3f68885cb27144b1 /util
parent5191e5f0f5d4b1905a4775657b9cdf6bc1daf58e (diff)
downloadmongo-4c677b4759a289c22b6b945d8b1d9ad65d3face2.tar.gz
clean up logging. now that we show the thread the indentation wasnt useful
Diffstat (limited to 'util')
-rw-r--r--util/sock.h15
-rw-r--r--util/util.cpp5
2 files changed, 7 insertions, 13 deletions
diff --git a/util/sock.h b/util/sock.h
index 300c24d2422..4b4290d2324 100644
--- a/util/sock.h
+++ b/util/sock.h
@@ -253,9 +253,7 @@ namespace mongo {
class ListeningSockets {
public:
- ListeningSockets() : _mutex("ListeningSockets"), _sockets( new set<int>() ){
- }
-
+ ListeningSockets() : _mutex("ListeningSockets"), _sockets( new set<int>() ) { }
void add( int sock ){
scoped_lock lk( _mutex );
_sockets->insert( sock );
@@ -264,7 +262,6 @@ namespace mongo {
scoped_lock lk( _mutex );
_sockets->erase( sock );
}
-
void closeAll(){
set<int>* s;
{
@@ -272,17 +269,13 @@ namespace mongo {
s = _sockets;
_sockets = new set<int>();
}
-
- for ( set<int>::iterator i=s->begin(); i!=s->end(); i++ ){
+ for ( set<int>::iterator i=s->begin(); i!=s->end(); i++ ) {
int sock = *i;
- log() << "\t going to close listening socket: " << sock << endl;
+ log() << "closing listening socket: " << sock << endl;
closesocket( sock );
- }
-
+ }
}
-
static ListeningSockets* get();
-
private:
mongo::mutex _mutex;
set<int>* _sockets;
diff --git a/util/util.cpp b/util/util.cpp
index c7bc20a4315..b4b10537777 100644
--- a/util/util.cpp
+++ b/util/util.cpp
@@ -165,8 +165,9 @@ namespace mongo {
char buf[64];
time_t_to_String( time(0) , buf );
- buf[20] = ' ';
- buf[21] = 0;
+ /* truncate / don't show the year: */
+ buf[19] = ' ';
+ buf[20] = 0;
Logstream::logLockless(buf);
Logstream::logLockless(s);