summaryrefslogtreecommitdiff
path: root/src/mongo/util/log.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2012-05-30 17:40:24 -0400
committerAndy Schwerin <schwerin@10gen.com>2012-05-31 09:50:29 -0400
commitef4d5cbf766a99dddb886ffbadceef0def82beb8 (patch)
tree58d53c593e6a76899beb78bc6e82c207eadcde77 /src/mongo/util/log.cpp
parentd0e8e4f665c69e2ee384c0828457038d40b1498e (diff)
downloadmongo-ef4d5cbf766a99dddb886ffbadceef0def82beb8.tar.gz
Rename sayDbContext() to logContext(), and move from util.{h,cpp} to log.{h,cpp}.
Remove now-empty util.h. Work toward SERVER-5702.
Diffstat (limited to 'src/mongo/util/log.cpp')
-rw-r--r--src/mongo/util/log.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp
index 9d2dd5bb882..5480656462f 100644
--- a/src/mongo/util/log.cpp
+++ b/src/mongo/util/log.cpp
@@ -19,6 +19,8 @@
#include "pch.h"
#include "assert_util.h"
#include "time_support.h"
+#include "mongo/util/stacktrace.h"
+
using namespace std;
#ifdef _WIN32
@@ -447,4 +449,11 @@ namespace mongo {
Logstream::logLockless("\n");
}
+ void logContext(const char *errmsg) {
+ if ( errmsg ) {
+ problem() << errmsg << endl;
+ }
+ printStackTrace();
+ }
+
}