diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/logger/log_component.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logger/log_component.h | 1 | ||||
-rwxr-xr-x | src/third_party/s2/base/logging.h | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/logger/log_component.cpp b/src/mongo/logger/log_component.cpp index a7358c7f180..0444844ae07 100644 --- a/src/mongo/logger/log_component.cpp +++ b/src/mongo/logger/log_component.cpp @@ -101,6 +101,7 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kStorage: return createStringData("storage"); case kJournaling: return createStringData("journaling"); case kWrites: return createStringData("writes"); + case kS2: return createStringData("S2"); case kNumLogComponents: return createStringData("total"); // No default. Compiler should complain if there's a log component that's not handled. } @@ -144,6 +145,7 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kStorage: return createStringData("STORAGE "); case kJournaling: return createStringData("JOURNAL "); case kWrites: return createStringData("WRITES "); + case kS2: return createStringData("S2 "); case kNumLogComponents: return createStringData("TOTAL "); // No default. Compiler should complain if there's a log component that's not handled. } diff --git a/src/mongo/logger/log_component.h b/src/mongo/logger/log_component.h index 0fcd0c3e95d..e104d369430 100644 --- a/src/mongo/logger/log_component.h +++ b/src/mongo/logger/log_component.h @@ -54,6 +54,7 @@ namespace logger { kStorage, kJournaling, kWrites, + kS2, kNumLogComponents }; diff --git a/src/third_party/s2/base/logging.h b/src/third_party/s2/base/logging.h index 460a8797912..b237090b3f1 100755 --- a/src/third_party/s2/base/logging.h +++ b/src/third_party/s2/base/logging.h @@ -54,8 +54,9 @@ #define FATAL LogMessageFatal(__FILE__, __LINE__).stream() #define DFATAL LogMessageFatal(__FILE__, __LINE__).stream() +// VLOG messages will be logged at debug level 5 with the S2 log component. #define S2LOG(x) x -#define VLOG(x) if (x>0) {} else S2LOG(INFO) +#define VLOG(x) MONGO_LOG_COMPONENT(::mongo::logger::LogSeverity::Debug(5), ::mongo::logger::LogComponent::kS2) class LogMessageFatal { public: |