Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SERVER-6461: Ensure that nullstream instance is constructed before ma…

…in().
  • Loading branch information...
commit 3e54e4c81705617abc25b6b6f1b7f04103b6b7d0 1 parent 0adc5d1
@andy10gen andy10gen authored
Showing with 5 additions and 2 deletions.
  1. +3 −1 src/mongo/util/log.cpp
  2. +2 −1  src/mongo/util/log.h
View
4 src/mongo/util/log.cpp
@@ -62,6 +62,9 @@ namespace mongo {
return Logstream::get().prolog();
}
+ Nullstream::Nullstream() {}
+ Nullstream::~Nullstream() {}
+
class LoggingManager {
public:
LoggingManager()
@@ -399,7 +402,6 @@ namespace mongo {
}
Logstream& Logstream::get() {
- fassert( 16397, doneSetup );
if ( StaticObserver::_destroyingStatics ) {
cout << "Logstream::get called in uninitialized state" << endl;
}
View
3  src/mongo/util/log.h
@@ -134,10 +134,11 @@ namespace mongo {
class Nullstream {
public:
+ Nullstream();
+ virtual ~Nullstream();
virtual Nullstream& operator<< (Tee* tee) {
return *this;
}
- virtual ~Nullstream() {}
virtual Nullstream& operator<<(const char *) {
return *this;
}
Please sign in to comment.
Something went wrong with that request. Please try again.