diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-04-25 12:23:19 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-26 23:06:52 +0000 |
commit | eae31861e0f813f0099e1d490c4a622d75cd5a08 (patch) | |
tree | bcfeb9feeb3bc37ccb1eb3250eca2f91e4bb8523 /src/mongo/logv2 | |
parent | 085ffeb310e8fed49739cf8443fcb13ea795d867 (diff) | |
download | mongo-eae31861e0f813f0099e1d490c4a622d75cd5a08.tar.gz |
SERVER-47735 change mongo source over to logv2
- Remove several legacy logger/ files
- Convert all MONGO_LOG_DEFAULT_COMPONENT to the LOGV2 version.
- Globally replace logger::{LogSeverity,LogComponent} => logv2::
Diffstat (limited to 'src/mongo/logv2')
-rw-r--r-- | src/mongo/logv2/log.h | 13 | ||||
-rw-r--r-- | src/mongo/logv2/log_component.h | 5 | ||||
-rw-r--r-- | src/mongo/logv2/log_component_settings.h | 5 | ||||
-rw-r--r-- | src/mongo/logv2/log_severity.h | 5 | ||||
-rw-r--r-- | src/mongo/logv2/redaction.cpp | 2 | ||||
-rw-r--r-- | src/mongo/logv2/redaction_test.cpp | 2 |
6 files changed, 4 insertions, 28 deletions
diff --git a/src/mongo/logv2/log.h b/src/mongo/logv2/log.h index e22c17b8c0f..24271b2f246 100644 --- a/src/mongo/logv2/log.h +++ b/src/mongo/logv2/log.h @@ -46,7 +46,6 @@ #include "mongo/base/status.h" #include "mongo/bson/util/builder.h" -#include "mongo/logger/log_version_util.h" #include "mongo/logv2/log_component.h" #include "mongo/logv2/log_component_settings.h" #include "mongo/logv2/log_debug.h" @@ -57,20 +56,12 @@ #include "mongo/logv2/redaction.h" #include "mongo/util/errno_util.h" -#if defined(MONGO_LOG_DEFAULT_COMPONENT) -#include "mongo/logger/log_version_util.h" -#endif - namespace { #if defined(MONGO_LOGV2_DEFAULT_COMPONENT) -const ::mongo::logv2::LogComponent MongoLogV2DefaultComponent_component = - MONGO_LOGV2_DEFAULT_COMPONENT; - // Provide log component in global scope so that MONGO_LOG will always have a valid component. // Global log component will be kDefault unless overridden by MONGO_LOGV2_DEFAULT_COMPONENT. -#elif defined(MONGO_LOG_DEFAULT_COMPONENT) -const ::mongo::logv2::LogComponent MongoLogV2DefaultComponent_component = - ::mongo::logComponentV1toV2(MONGO_LOG_DEFAULT_COMPONENT); +const mongo::logv2::LogComponent MongoLogV2DefaultComponent_component = + MONGO_LOGV2_DEFAULT_COMPONENT; #else #error \ "mongo/logv2/log.h requires MONGO_LOGV2_DEFAULT_COMPONENT to be defined. " \ diff --git a/src/mongo/logv2/log_component.h b/src/mongo/logv2/log_component.h index 407a79e16e0..df5cd2daac1 100644 --- a/src/mongo/logv2/log_component.h +++ b/src/mongo/logv2/log_component.h @@ -144,8 +144,3 @@ private: std::ostream& operator<<(std::ostream& os, LogComponent component); } // namespace mongo::logv2 - -// Legacy alias -namespace mongo::logger { -using logv2::LogComponent; -} // namespace mongo::logger diff --git a/src/mongo/logv2/log_component_settings.h b/src/mongo/logv2/log_component_settings.h index fd2737a2401..3aab96a688c 100644 --- a/src/mongo/logv2/log_component_settings.h +++ b/src/mongo/logv2/log_component_settings.h @@ -102,8 +102,3 @@ private: }; } // namespace mongo::logv2 - -// Legacy alias -namespace mongo::logger { -using logv2::LogComponentSettings; -} // namespace mongo::logger diff --git a/src/mongo/logv2/log_severity.h b/src/mongo/logv2/log_severity.h index 6786a21e3b6..796dd43548e 100644 --- a/src/mongo/logv2/log_severity.h +++ b/src/mongo/logv2/log_severity.h @@ -177,8 +177,3 @@ private: }; } // namespace mongo::logv2 - -// Legacy alias -namespace mongo::logger { -using logv2::LogSeverity; -} // namespace mongo::logger diff --git a/src/mongo/logv2/redaction.cpp b/src/mongo/logv2/redaction.cpp index 69758de7e04..239e091aead 100644 --- a/src/mongo/logv2/redaction.cpp +++ b/src/mongo/logv2/redaction.cpp @@ -27,7 +27,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" diff --git a/src/mongo/logv2/redaction_test.cpp b/src/mongo/logv2/redaction_test.cpp index f5df641e3e4..c7db40ab768 100644 --- a/src/mongo/logv2/redaction_test.cpp +++ b/src/mongo/logv2/redaction_test.cpp @@ -27,7 +27,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/logv2/redaction.h" |