summaryrefslogtreecommitdiff
path: root/src/mongo/logv2
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-09-03 19:11:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-08 07:54:48 +0000
commitc90f38192378c8526354465991830524eda90c1f (patch)
tree73ce6a76f4dc6f8eaa206309becf5881aaf20a32 /src/mongo/logv2
parenta0a0d7eecccf38f028a77c4cc8b0f13f8673f675 (diff)
downloadmongo-c90f38192378c8526354465991830524eda90c1f.tar.gz
SERVER-59782 migrate makeGuard calls to ScopeGuard
Diffstat (limited to 'src/mongo/logv2')
-rw-r--r--src/mongo/logv2/log_manager.cpp2
-rw-r--r--src/mongo/logv2/logv2_test.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/logv2/log_manager.cpp b/src/mongo/logv2/log_manager.cpp
index f9841d7fd79..8cc4dba7187 100644
--- a/src/mongo/logv2/log_manager.cpp
+++ b/src/mongo/logv2/log_manager.cpp
@@ -55,7 +55,7 @@ LogManager::LogManager() {
boost::log::core::get()->set_exception_handler([]() {
thread_local uint32_t depth = 0;
- auto depthGuard = makeGuard([]() { --depth; });
+ ScopeGuard depthGuard([]() { --depth; });
++depth;
// Try and log that we failed to log
if (depth == 1) {
diff --git a/src/mongo/logv2/logv2_test.cpp b/src/mongo/logv2/logv2_test.cpp
index 9eca2ecbe16..fed5d05f2d1 100644
--- a/src/mongo/logv2/logv2_test.cpp
+++ b/src/mongo/logv2/logv2_test.cpp
@@ -198,7 +198,7 @@ public:
sink->set_formatter(PlainFormatter());
boost::log::core::get()->add_sink(sink);
- auto enabledGuard = makeGuard([this] { enabled = false; });
+ ScopeGuard enabledGuard([this] { enabled = false; });
LOGV2(20001, "log during init");
ASSERT_EQUALS(lines.back(), "log during init");
}