summaryrefslogtreecommitdiff
path: root/src/mongo/db/lasterror.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2014-08-05 14:32:45 -0400
committerBenety Goh <benety@mongodb.com>2014-08-12 18:56:41 -0400
commita3845092f26955e6cbfca868fd136b7d5eefed9b (patch)
treedfb566b50a00b8c64002e6107d9fcbdb1443c6cf /src/mongo/db/lasterror.cpp
parent0ea8cf462b48a1aeefb10fd4bba0b1e93b0e661e (diff)
downloadmongo-a3845092f26955e6cbfca868fd136b7d5eefed9b.tar.gz
SERVER-14729 logging cleanup - removed mongo/util/log.h from headers, de-inlining functions that use logging where applicable.
de-inlined BSONElement::_asCode() de-inlined BSONObjBuilder::appendDate() de-inlined DBClientCursor::nextSafe() de-inlined IndexDescriptor::_checkOk() de-inlined LastErrorHolder::getSafe() de-inlined UpdateResult constructor de-inlined QueryPlannerCommon::reverseScans() de-inlined repl::ScopedConn::connect() de-inlined repl::_MultiCommand::run() de-inlined OplogReader::tailCheck() de-inlined repl::StateBox::change() de-inlined repl::SyncSourceFeedback::_resetConnection() de-inlined DiskLoc56Bit::operator=() de-inlined DurableInterface::~DurableInterface() de-inlined ListeningSockets::closeAll() de-inlined RelativePath::fromFullPath() and getPartition() de-inlined V8Scope::checkV8ErrorState and removed debug log message from ObjTracker destructor (v8-3.25) de-inlined V8Scope::checkV8ErrorState and removed debug log message from ObjTracker destructor removed log message from List1::orphan() - this should have no user-facing impact because List1::orphan() is used in tests only removed log message from RWLockRecursiveNongreedy::Lock() removed log message from RSBase destructor removed log.h dependency from DESTRUCTOR_GUARD macro removed mongo/util/log.h dependency from qlog.h removed mongo/util/log.h dependency from stacktrace.h removed mongo/util/log.h dependency from s2 logging header removed mongo/util/log.h dependency from chunk_diff-inl.cpp removed mongo/util/log.h from pch.h removed unused mongo/util/log.h include from inlined file sorter.cpp convert HashTable<K,V> to non-template NamespaceHashTable. De-inlined NamespaceHashTable::_find() and constructor convert isself getMyAddrs()and getallIPs() debug log to use LOG() macro assign default log component MONGO_LOG_DEFAULT_COMPONENT removed unused macros LOGATMOST and LOGSOME removed unused FLOG() macro from goodies.h
Diffstat (limited to 'src/mongo/db/lasterror.cpp')
-rw-r--r--src/mongo/db/lasterror.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mongo/db/lasterror.cpp b/src/mongo/db/lasterror.cpp
index 130254c4a8f..b3bc72f068d 100644
--- a/src/mongo/db/lasterror.cpp
+++ b/src/mongo/db/lasterror.cpp
@@ -27,11 +27,12 @@
* then also delete it in the license file.
*/
-#include "mongo/pch.h"
+#include "mongo/platform/basic.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/jsobj.h"
+#include "mongo/util/log.h"
#include "mongo/util/net/message.h"
namespace mongo {
@@ -117,6 +118,15 @@ namespace mongo {
return 0;
}
+ LastError * LastErrorHolder::getSafe() {
+ LastError * le = get(false);
+ if ( ! le ) {
+ error() << " no LastError!" << std::endl;
+ verify( le );
+ }
+ return le;
+ }
+
LastError * LastErrorHolder::_get( bool create ) {
LastError * le = _tl.get();
if ( ! le && create ) {