diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-05-30 17:40:24 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-05-31 09:50:29 -0400 |
commit | ef4d5cbf766a99dddb886ffbadceef0def82beb8 (patch) | |
tree | 58d53c593e6a76899beb78bc6e82c207eadcde77 /src/mongo/util/log.cpp | |
parent | d0e8e4f665c69e2ee384c0828457038d40b1498e (diff) | |
download | mongo-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.cpp | 9 |
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(); + } + } |