summaryrefslogtreecommitdiff
path: root/src/mongo/util/assert_util.h
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/util/assert_util.h
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/util/assert_util.h')
-rw-r--r--src/mongo/util/assert_util.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mongo/util/assert_util.h b/src/mongo/util/assert_util.h
index 525631e2e48..d10ea6df6a9 100644
--- a/src/mongo/util/assert_util.h
+++ b/src/mongo/util/assert_util.h
@@ -37,6 +37,10 @@
#include "mongo/bson/inline_decls.h"
#include "mongo/client/export_macros.h"
#include "mongo/platform/compiler.h"
+#include "mongo/logger/log_severity.h"
+#include "mongo/logger/logger.h"
+#include "mongo/logger/logstream_builder.h"
+#include "mongo/util/concurrency/thread_name.h"
namespace mongo {
@@ -311,10 +315,16 @@ namespace mongo {
try { \
expression; \
} catch ( const std::exception &e ) { \
- ::mongo::log() << "caught exception (" << e.what() << ") in destructor (" << __FUNCTION__ \
- << ")" << std::endl; \
+ ::mongo::logger::LogstreamBuilder(::mongo::logger::globalLogDomain(), \
+ ::mongo::getThreadName(), \
+ ::mongo::logger::LogSeverity::Log()) \
+ << "caught exception (" << e.what() << ") in destructor (" << __FUNCTION__ \
+ << ")" << std::endl; \
} catch ( ... ) { \
- ::mongo::log() << "caught unknown exception in destructor (" << __FUNCTION__ << ")" \
- << std::endl; \
+ ::mongo::logger::LogstreamBuilder(::mongo::logger::globalLogDomain(), \
+ ::mongo::getThreadName(), \
+ ::mongo::logger::LogSeverity::Log()) \
+ << "caught unknown exception in destructor (" << __FUNCTION__ << ")" \
+ << std::endl; \
}