diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/util/log.cpp | 8 | ||||
-rw-r--r-- | src/mongo/util/log.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp index 840ec57dd47..ff9e18e750e 100644 --- a/src/mongo/util/log.cpp +++ b/src/mongo/util/log.cpp @@ -19,6 +19,7 @@ #include "pch.h" #include "assert_util.h" #include "time_support.h" +#include "mongo/util/concurrency/threadlocal.h" #include "mongo/util/stacktrace.h" using namespace std; @@ -52,7 +53,8 @@ namespace mongo { Nullstream nullstream; vector<Tee*>* Logstream::globalTees = 0; - thread_specific_ptr<Logstream> Logstream::tsp; + TSP_DECLARE(Logstream, Logstream_tsp); + TSP_DEFINE(Logstream, Logstream_tsp); Nullstream& tlog( int level ) { if ( !debug && level > tlogLevel ) @@ -408,9 +410,9 @@ namespace mongo { if ( StaticObserver::_destroyingStatics ) { cout << "Logstream::get called in uninitialized state" << endl; } - Logstream *p = tsp.get(); + Logstream *p = Logstream_tsp.get(); if( p == 0 ) - tsp.reset( p = new Logstream() ); + Logstream_tsp.reset( p = new Logstream() ); return *p; } diff --git a/src/mongo/util/log.h b/src/mongo/util/log.h index 1f6e59a3af5..b19d27b58cd 100644 --- a/src/mongo/util/log.h +++ b/src/mongo/util/log.h @@ -341,7 +341,6 @@ namespace mongo { int getIndent() const { return indent; } private: - static boost::thread_specific_ptr<Logstream> tsp; Logstream() { indent = 0; _init(); |