{\rtf1\ansi\ansicpg1252\cocoartf2638
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 diff --git a/test/cppsuite/src/common/logger.cpp b/test/cppsuite/src/common/logger.cpp\
index e73f841d2..4273f289d 100644\
--- a/test/cppsuite/src/common/logger.cpp\
+++ b/test/cppsuite/src/common/logger.cpp\
@@ -40,14 +40,12 @@ extern "C" \{\
 \
 /* Define helpful functions related to debugging. */\
 namespace test_harness \{\
-/* Order of elements in this vector corresponds to the definitions in the header. */\
-const std::vector<std::string> loggingLevels = \{"ERROR", "WARN", "INFO", "TRACE"\};\
 \
 /* Mutex used by logger to synchronize printing. */\
 static std::mutex _loggerMutex;\
 \
 /* Set default log level. */\
-int64_t Logger::traceLevel = LOG_WARN;\
+LoggingLevel Logger::loggingLevel = LoggingLevel::kWarning;\
 \
 void\
 GetTime(char *timeBuffer, size_t bufferSize)\
@@ -71,22 +69,39 @@ GetTime(char *timeBuffer, size_t bufferSize)\
       ".%" PRIu64 "Z]", (uint64_t)epochNano % WT_BILLION));\
 \}\
 \
+std::string\
+Logger::LoggingLevelToString(LoggingLevel level)\
+\{\
+    switch (level) \{\
+    case LoggingLevel::kError:\
+        return ("ERROR");\
+    case LoggingLevel::kWarning:\
+        return ("WARNING");\
+    case LoggingLevel::kInfo:\
+        return ("INFO");\
+    case LoggingLevel::kTrace:\
+        return ("TRACE");\
+    default:\
+        testutil_die(EINVAL, "unexpected LoggingLevel: %d", static_cast<int>(level));\
+    \}\
+\}\
+\
 /* Used to print out traces for debugging purpose. */\
 void\
-Logger::LogMessage(int64_t traceType, const std::string &str)\
+Logger::LogMessage(LoggingLevel level, const std::string &str)\
 \{\
-    if (Logger::traceLevel >= traceType) \{\
-        testutil_assert(traceType >= LOG_ERROR && traceType < loggingLevels.size());\
+    if (Logger::loggingLevel >= level) \{\
+        testutil_assert(level >= LoggingLevel::kError && level <= LoggingLevel::kTrace);\
 \
         char timeBuffer[64];\
         GetTime(timeBuffer, sizeof(timeBuffer));\
 \
         std::ostringstream ss;\
         ss << timeBuffer << "[TID:" << std::this_thread::get_id() << "]["\
-           << loggingLevels[traceType] << "]: " << str << std::endl;\
+           << LoggingLevelToString(level) << "]: " << str << std::endl;\
 \
         std::lock_guard<std::mutex> lg(_loggerMutex);\
-        if (traceType == LOG_ERROR)\
+        if (level == LoggingLevel::kError)\
             std::cerr << ss.str();\
         else\
             std::cout << ss.str();\
diff --git a/test/cppsuite/src/common/logger.h b/test/cppsuite/src/common/logger.h\
index 2cc6415a8..6f85f4bfd 100644\
--- a/test/cppsuite/src/common/logger.h\
+++ b/test/cppsuite/src/common/logger.h\
@@ -43,30 +43,26 @@\
 namespace test_harness \{\
 \
 /*\
- * Possible log levels. If you change anything here make sure you update loggingLevels accordingly.\
+ * Different logging levels. Note that the trace level can incur a performance overhead since the\
+ * current logging implementation requires per-line locking.\
  */\
-#define LOG_ERROR 0\
-#define LOG_WARN 1\
-#define LOG_INFO 2\
-/*\
- * The trace log level can incur a performance overhead since the current logging implementation\
- * requires per-line locking.\
- */\
-#define LOG_TRACE 3\
+enum LoggingLevel \{ kError, kWarning, kInfo, kTrace \};\
 \
 void GetTime(char *timeBuffer, size_t bufferSize);\
 \
 class Logger \{\
     public:\
     /* Used to print out traces for debugging purpose. */\
-    static void LogMessage(int64_t traceType, const std::string &str);\
+    static void LogMessage(LoggingLevel level, const std::string &str);\
+    static std::string LoggingLevelToString(LoggingLevel level);\
+\
 \
     /* Make sure the class will not be instantiated. */\
     Logger() = delete;\
 \
     public:\
-    /* Current log level. Default is LOG_WARN. */\
-    static int64_t traceLevel;\
+    /* Current log level. Default is LoggingLevel::kWarning. */\
+    static LoggingLevel loggingLevel;\
 \};\
 \} // namespace test_harness\
 \
diff --git a/test/cppsuite/src/common/thread_manager.cpp b/test/cppsuite/src/common/thread_manager.cpp\
index fcb6a8ca9..7361e1f85 100644\
--- a/test/cppsuite/src/common/thread_manager.cpp\
+++ b/test/cppsuite/src/common/thread_manager.cpp\
@@ -35,7 +35,8 @@ ThreadManager::~ThreadManager()\
 \{\
     for (auto &it : _workers) \{\
         if (it != nullptr && it->joinable()) \{\
-            Logger::LogMessage(LOG_ERROR, "You should've called join on the thread manager");\
+            Logger::LogMessage(\
+              LoggingLevel::kError, "You should've called join on the thread manager");\
             it->join();\
         \}\
         delete it;\
@@ -50,7 +51,7 @@ ThreadManager::Join()\
     for (const auto &it : _workers) \{\
         while (!it->joinable()) \{\
             /* Helpful for diagnosing hangs. */\
-            Logger::LogMessage(LOG_TRACE, "Thread manager: Waiting to join.");\
+            Logger::LogMessage(LoggingLevel::kTrace, "Thread manager: Waiting to join.");\
             /* Check every so often to avoid spamming the log. */\
             std::this_thread::sleep_for(std::chrono::milliseconds(100));\
         \}\
diff --git a/test/cppsuite/src/component/component.cpp b/test/cppsuite/src/component/component.cpp\
index c696a57e1..73922c5cb 100644\
--- a/test/cppsuite/src/component/component.cpp\
+++ b/test/cppsuite/src/component/component.cpp\
@@ -46,7 +46,7 @@ Component::~Component()\
 void\
 Component::Load()\
 \{\
-    Logger::LogMessage(LOG_INFO, "Loading component: " + _name);\
+    Logger::LogMessage(LoggingLevel::kInfo, "Loading component: " + _name);\
     _enabled = _config->GetOptionalBool(kConfigEnabled, true);\
     /* If we're not enabled we shouldn't be running. */\
     _running = _enabled;\
@@ -60,7 +60,7 @@ Component::Load()\
 void\
 Component::Run()\
 \{\
-    Logger::LogMessage(LOG_INFO, "Running component: " + _name);\
+    Logger::LogMessage(LoggingLevel::kInfo, "Running component: " + _name);\
     while (_enabled && _running) \{\
         DoWork();\
         std::this_thread::sleep_for(std::chrono::milliseconds(_sleepTimeMs));\
@@ -88,6 +88,6 @@ Component::EndRun()\
 void\
 Component::Finish()\
 \{\
-    Logger::LogMessage(LOG_INFO, "Running finish stage of component: " + _name);\
+    Logger::LogMessage(LoggingLevel::kInfo, "Running finish stage of component: " + _name);\
 \}\
 \} // namespace test_harness\
diff --git a/test/cppsuite/src/component/metrics_monitor.cpp b/test/cppsuite/src/component/metrics_monitor.cpp\
index b02c45cd3..8aa90fc7d 100644\
--- a/test/cppsuite/src/component/metrics_monitor.cpp\
+++ b/test/cppsuite/src/component/metrics_monitor.cpp\
@@ -146,11 +146,11 @@ MetricsMonitor::Finish()\
             const std::string error_string = "MetricsMonitor: Postrun stat \\"" + statisticsName +\
               "\\" was outside of the specified limits. Min=" + std::to_string(min) +\
               " Max=" + std::to_string(max) + " Actual=" + std::to_string(value);\
-            Logger::LogMessage(LOG_ERROR, error_string);\
+            Logger::LogMessage(LoggingLevel::kError, error_string);\
             success = false;\
         \}\
 \
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           "MetricsMonitor: Final value of stat " + statisticsName +\
             " is: " + std::to_string(value));\
     \}\
diff --git a/test/cppsuite/src/component/operation_tracker.cpp b/test/cppsuite/src/component/operation_tracker.cpp\
index 07e50cf30..0005cc447 100644\
--- a/test/cppsuite/src/component/operation_tracker.cpp\
+++ b/test/cppsuite/src/component/operation_tracker.cpp\
@@ -68,12 +68,12 @@ OperationTracker::Load()\
     testutil_check(\
       _session->create(_session.Get(), _schemaTableName.c_str(), _schemaTableConfig.c_str()));\
     _schemaTrackingCursor = _session.OpenScopedCursor(_schemaTableName);\
-    Logger::LogMessage(LOG_TRACE, "Schema tracking initiated");\
+    Logger::LogMessage(LoggingLevel::kTrace, "Schema tracking initiated");\
 \
     /* Initiate operations tracking. */\
     testutil_check(\
       _session->create(_session.Get(), _operationTableName.c_str(), _operationTableConfig.c_str()));\
-    Logger::LogMessage(LOG_TRACE, "Operations tracking created");\
+    Logger::LogMessage(LoggingLevel::kTrace, "Operations tracking created");\
 \
     /*\
      * Open sweep cursor in a dedicated sweep session. This cursor will be used to clear out\
@@ -81,7 +81,7 @@ OperationTracker::Load()\
      */\
     _sweepSession = ConnectionManager::GetInstance().CreateSession();\
     _sweepCursor = _sweepSession.OpenScopedCursor(_operationTableName);\
-    Logger::LogMessage(LOG_TRACE, "Tracking table sweep initialized");\
+    Logger::LogMessage(LoggingLevel::kTrace, "Tracking table sweep initialized");\
 \}\
 \
 void\
@@ -129,8 +129,8 @@ OperationTracker::DoWork()\
         \}\
         if (timestamp <= oldestTimestamp) \{\
             if (globallyVisibleUpdateFound) \{\
-                if (Logger::traceLevel == LOG_TRACE)\
-                    Logger::LogMessage(LOG_TRACE,\
+                if (Logger::loggingLevel == LoggingLevel::kTrace)\
+                    Logger::LogMessage(LoggingLevel::kTrace,\
                       std::string("workload tracking: Obsoleted update, key=") + sweepKey +\
                         ", collectionId=" + std::to_string(collectionId) +\
                         ", timestamp=" + std::to_string(timestamp) + ", oldest_timestamp=" +\
@@ -145,8 +145,8 @@ OperationTracker::DoWork()\
                 testutil_check(_sweepSession->commit_transaction(_sweepSession.Get(), nullptr));\
             \} else if (static_cast<TrackingOperation>(operationType) ==\
               TrackingOperation::kInsert) \{\
-                if (Logger::traceLevel == LOG_TRACE)\
-                    Logger::LogMessage(LOG_TRACE,\
+                if (Logger::loggingLevel == LoggingLevel::kTrace)\
+                    Logger::LogMessage(LoggingLevel::kTrace,\
                       std::string("workload tracking: Found globally visible update, key=") +\
                         sweepKey + ", collectionId=" + std::to_string(collectionId) +\
                         ", timestamp=" + std::to_string(timestamp) + ", oldest_timestamp=" +\
@@ -165,7 +165,7 @@ OperationTracker::DoWork()\
      * work.\
      */\
     if (ret != 0 && ret != WT_NOTFOUND)\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Tracking table sweep failed: cursor->next() returned an unexpected error %d.", ret);\
 \
     /* If we have a position, give it up. */\
diff --git a/test/cppsuite/src/component/statistics/cache_limit.cpp b/test/cppsuite/src/component/statistics/cache_limit.cpp\
index 836e88586..e6a87ddae 100644\
--- a/test/cppsuite/src/component/statistics/cache_limit.cpp\
+++ b/test/cppsuite/src/component/statistics/cache_limit.cpp\
@@ -52,7 +52,8 @@ CacheLimit::Check(ScopedCursor &cursor)\
           " usage: " + std::to_string(cacheFillRatio);\
         testutil_die(-1, error.c_str());\
     \} else\
-        Logger::LogMessage(LOG_TRACE, name + " usage: " + std::to_string(cacheFillRatio));\
+        Logger::LogMessage(\
+          LoggingLevel::kTrace, name + " usage: " + std::to_string(cacheFillRatio));\
 \}\
 \
 std::string\
diff --git a/test/cppsuite/src/component/statistics/database_size.cpp b/test/cppsuite/src/component/statistics/database_size.cpp\
index 2c875bd6d..74374a54b 100644\
--- a/test/cppsuite/src/component/statistics/database_size.cpp\
+++ b/test/cppsuite/src/component/statistics/database_size.cpp\
@@ -52,7 +52,8 @@ DatabaseSize::DatabaseSize(Configuration &config, const std::string &name, Datab\
     : Statistics(config, name, -1), _database(database)\
 \{\
 #ifdef _WIN32\
-    Logger::LogMessage("Database size checking is not implemented on Windows", LOG_ERROR);\
+    Logger::LogMessage(\
+      "Database size checking is not implemented on Windows", LoggingLevel::kError);\
 #endif\
 \}\
 \
@@ -63,7 +64,7 @@ DatabaseSize::Check(ScopedCursor &)\
     const auto filenames = GetFilenames();\
     size_t databaseSize = GetDatabaseSize();\
     Logger::LogMessage(\
-      LOG_TRACE, "Current database size is " + std::to_string(databaseSize) + " bytes");\
+      LoggingLevel::kTrace, "Current database size is " + std::to_string(databaseSize) + " bytes");\
 \
     if (databaseSize > max) \{\
         const std::string error =\
@@ -90,7 +91,8 @@ DatabaseSize::GetDatabaseSize() const\
         struct stat sb;\
         if (stat(name.c_str(), &sb) == 0) \{\
             databaseSize += sb.st_size;\
-            Logger::LogMessage(LOG_TRACE, name + " was " + std::to_string(sb.st_size) + " bytes");\
+            Logger::LogMessage(\
+              LoggingLevel::kTrace, name + " was " + std::to_string(sb.st_size) + " bytes");\
         \} else\
             /* The only good reason for this to fail is if the file hasn't been created yet. */\
             testutil_assert(errno == ENOENT);\
diff --git a/test/cppsuite/src/component/statistics/statistics.cpp b/test/cppsuite/src/component/statistics/statistics.cpp\
index bd6a4ba97..e43067269 100644\
--- a/test/cppsuite/src/component/statistics/statistics.cpp\
+++ b/test/cppsuite/src/component/statistics/statistics.cpp\
@@ -52,7 +52,7 @@ Statistics::Check(ScopedCursor &cursor)\
           " Max=" + std::to_string(max) + " Actual=" + std::to_string(value);\
         testutil_die(-1, error.c_str());\
     \} else\
-        Logger::LogMessage(LOG_TRACE, name + " usage: " + std::to_string(value));\
+        Logger::LogMessage(LoggingLevel::kTrace, name + " usage: " + std::to_string(value));\
 \}\
 \
 std::string\
diff --git a/test/cppsuite/src/component/timestamp_manager.cpp b/test/cppsuite/src/component/timestamp_manager.cpp\
index c0140781b..0b9149fc1 100644\
--- a/test/cppsuite/src/component/timestamp_manager.cpp\
+++ b/test/cppsuite/src/component/timestamp_manager.cpp\
@@ -103,7 +103,7 @@ TimestampManager::DoWork()\
     \}\
 \
     if (!LogMessage.empty())\
-        Logger::LogMessage(LOG_TRACE, LogMessage);\
+        Logger::LogMessage(LoggingLevel::kTrace, LogMessage);\
 \
     /*\
      * Save the new timestamps. Any timestamps that we're viewing from another thread should be set\
diff --git a/test/cppsuite/src/component/workload_manager.cpp b/test/cppsuite/src/component/workload_manager.cpp\
index 63a729b49..e065a0df0 100644\
--- a/test/cppsuite/src/component/workload_manager.cpp\
+++ b/test/cppsuite/src/component/workload_manager.cpp\
@@ -83,7 +83,7 @@ WorkloadManager::Run()\
     /* Generate threads to execute the different operations on the collections. */\
     for (auto &it : operationConfigs) \{\
         if (it.threadCount != 0)\
-            Logger::LogMessage(LOG_INFO,\
+            Logger::LogMessage(LoggingLevel::kInfo,\
               "WorkloadManager: Creating " + std::to_string(it.threadCount) + " " +\
                 ThreadTypeToString(it.type) + " threads.");\
         for (size_t i = 0; i < it.threadCount && _running; ++i) \{\
@@ -114,7 +114,7 @@ WorkloadManager::Finish()\
     for (const auto &it : _workers)\
         it->Finish();\
     _threadManager.Join();\
-    Logger::LogMessage(LOG_TRACE, "Workload generator: run stage done");\
+    Logger::LogMessage(LoggingLevel::kTrace, "Workload generator: run stage done");\
 \}\
 \
 Database &\
diff --git a/test/cppsuite/src/main/configuration.cpp b/test/cppsuite/src/main/configuration.cpp\
index b4cc6b846..3bc9bf55f 100644\
--- a/test/cppsuite/src/main/configuration.cpp\
+++ b/test/cppsuite/src/main/configuration.cpp\
@@ -79,7 +79,7 @@ Configuration::Configuration(const std::string &testConfigName, const std::strin\
     std::string default_config = std::string(configEntry->base);\
     /* Merge in the default configuration. */\
     _config = MergeDefaultConfig(default_config, config);\
-    Logger::LogMessage(LOG_INFO, "Full config: " + _config);\
+    Logger::LogMessage(LoggingLevel::kInfo, "Full config: " + _config);\
 \
     int ret =\
       wiredtiger_test_config_validate(nullptr, nullptr, testConfigName.c_str(), _config.c_str());\
@@ -166,8 +166,8 @@ Configuration::GetList(const std::string &key)\
 \
 template <typename T>\
 T\
-Configuration::Get(\
-  const std::string &key, bool optional, ConfigurationType type, T def, T (*func)(WT_CONFIG_ITEM item))\
+Configuration::Get(const std::string &key, bool optional, ConfigurationType type, T def,\
+  T (*func)(WT_CONFIG_ITEM item))\
 \{\
     WT_DECL_RET;\
     WT_CONFIG_ITEM value = \{"", 0, 1, WT_CONFIG_ITEM::WT_CONFIG_ITEM_BOOL\};\
diff --git a/test/cppsuite/src/main/database_operation.cpp b/test/cppsuite/src/main/database_operation.cpp\
index 9e264d306..d5c47e8c0 100644\
--- a/test/cppsuite/src/main/database_operation.cpp\
+++ b/test/cppsuite/src/main/database_operation.cpp\
@@ -66,7 +66,7 @@ PopulateWorker(ThreadWorker *threadWorker)\
         \}\
     \}\
     Logger::LogMessage(\
-      LOG_TRACE, "Populate: thread \{" + std::to_string(threadWorker->id) + "\} finished");\
+      LoggingLevel::kTrace, "Populate: thread \{" + std::to_string(threadWorker->id) + "\} finished");\
 \}\
 \
 void\
@@ -85,8 +85,8 @@ DatabaseOperation::Populate(Database &database, TimestampManager *timestampManag\
     /* Keys must be unique. */\
     testutil_assert(keyCountPerCollection <= pow(10, keySize));\
 \
-    Logger::LogMessage(\
-      LOG_INFO, "Populate: creating " + std::to_string(collectionCount) + " collections.");\
+    Logger::LogMessage(LoggingLevel::kInfo,\
+      "Populate: creating " + std::to_string(collectionCount) + " collections.");\
 \
     /* Create n collections as per the configuration. */\
     for (int64_t i = 0; i < collectionCount; ++i)\
@@ -96,8 +96,8 @@ DatabaseOperation::Populate(Database &database, TimestampManager *timestampManag\
          */\
         database.AddCollection(keyCountPerCollection);\
 \
-    Logger::LogMessage(\
-      LOG_INFO, "Populate: " + std::to_string(collectionCount) + " collections created.");\
+    Logger::LogMessage(LoggingLevel::kInfo,\
+      "Populate: " + std::to_string(collectionCount) + " collections created.");\
 \
     /*\
      * Spawn threadCount threads to populate the database, theoretically we should be IO bound here.\
@@ -113,7 +113,7 @@ DatabaseOperation::Populate(Database &database, TimestampManager *timestampManag\
     \}\
 \
     /* Wait for our populate threads to finish and then join them. */\
-    Logger::LogMessage(LOG_INFO, "Populate: waiting for threads to complete.");\
+    Logger::LogMessage(LoggingLevel::kInfo, "Populate: waiting for threads to complete.");\
     threadManager.Join();\
 \
     /* Cleanup our workers. */\
@@ -121,13 +121,13 @@ DatabaseOperation::Populate(Database &database, TimestampManager *timestampManag\
         delete it;\
         it = nullptr;\
     \}\
-    Logger::LogMessage(LOG_INFO, "Populate: finished.");\
+    Logger::LogMessage(LoggingLevel::kInfo, "Populate: finished.");\
 \}\
 \
 void\
 DatabaseOperation::CheckpointOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
 \
@@ -140,7 +140,7 @@ DatabaseOperation::CheckpointOperation(ThreadWorker *threadWorker)\
 void\
 DatabaseOperation::CustomOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
 \}\
@@ -148,7 +148,7 @@ DatabaseOperation::CustomOperation(ThreadWorker *threadWorker)\
 void\
 DatabaseOperation::InsertOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
 \
@@ -229,7 +229,7 @@ DatabaseOperation::InsertOperation(ThreadWorker *threadWorker)\
 void\
 DatabaseOperation::ReadOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
 \
@@ -272,7 +272,7 @@ DatabaseOperation::ReadOperation(ThreadWorker *threadWorker)\
 void\
 DatabaseOperation::RemoveOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
 \
@@ -296,7 +296,7 @@ DatabaseOperation::RemoveOperation(ThreadWorker *threadWorker)\
 \
         /* Look for existing cursors in our cursor cache. */\
         if (cursors.find(coll.id) == cursors.end()) \{\
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "Thread \{" + std::to_string(threadWorker->id) +\
                 "\} Creating cursor for collection: " + coll.name);\
             /* Open the two cursors for the chosen collection. */\
@@ -348,7 +348,7 @@ DatabaseOperation::RemoveOperation(ThreadWorker *threadWorker)\
 void\
 DatabaseOperation::UpdateOperation(ThreadWorker *threadWorker)\
 \{\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
         "\} commencing.");\
     /* Cursor map. */\
@@ -369,7 +369,7 @@ DatabaseOperation::UpdateOperation(ThreadWorker *threadWorker)\
 \
         /* Look for existing cursors in our cursor cache. */\
         if (cursors.find(coll.id) == cursors.end()) \{\
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "Thread \{" + std::to_string(threadWorker->id) +\
                 "\} Creating cursor for collection: " + coll.name);\
             /* Open a cursor for the chosen collection. */\
diff --git a/test/cppsuite/src/main/test.cpp b/test/cppsuite/src/main/test.cpp\
index f4eb2a9f9..4e188c798 100644\
--- a/test/cppsuite/src/main/test.cpp\
+++ b/test/cppsuite/src/main/test.cpp\
@@ -142,8 +142,8 @@ Test::Run()\
 \
     /* The test will run for the duration as defined in the config. */\
     int64_t duration_secs = _config->GetInt(kDurationSecs);\
-    Logger::LogMessage(\
-      LOG_INFO, "Waiting \{" + std::to_string(duration_secs) + "\} seconds for testing to complete.");\
+    Logger::LogMessage(LoggingLevel::kInfo,\
+      "Waiting \{" + std::to_string(duration_secs) + "\} seconds for testing to complete.");\
     std::this_thread::sleep_for(std::chrono::seconds(duration_secs));\
 \
     /* Notify components that they should complete their last iteration. */\
@@ -151,7 +151,7 @@ Test::Run()\
         it->EndRun();\
 \
     /* Call join on the components threads so we know they have finished their loop. */\
-    Logger::LogMessage(LOG_INFO,\
+    Logger::LogMessage(LoggingLevel::kInfo,\
       "Joining all component threads.\\n This could take a while as we need to wait"\
       " for all components to finish their current loop.");\
     _threadManager->Join();\
@@ -171,6 +171,6 @@ Test::Run()\
     /* Log perf stats. */\
     MetricsWriter::GetInstance().WriteToFile(_args.testName);\
 \
-    Logger::LogMessage(LOG_INFO, "SUCCESS");\
+    Logger::LogMessage(LoggingLevel::kInfo, "SUCCESS");\
 \}\
 \} // namespace test_harness\
diff --git a/test/cppsuite/src/main/transaction.cpp b/test/cppsuite/src/main/transaction.cpp\
index a2ef74da2..e97d9a1b2 100644\
--- a/test/cppsuite/src/main/transaction.cpp\
+++ b/test/cppsuite/src/main/transaction.cpp\
@@ -101,7 +101,7 @@ Transaction::Commit(const std::string &config)\
     testutil_assert(ret == 0 || ret == EINVAL || ret == WT_ROLLBACK);\
 \
     if (ret != 0)\
-        Logger::LogMessage(LOG_WARN,\
+        Logger::LogMessage(LoggingLevel::kWarning,\
           "Failed to commit transaction in commit, received error code: " + std::to_string(ret));\
     _opCount = 0;\
     _running = false;\
diff --git a/test/cppsuite/src/main/validator.cpp b/test/cppsuite/src/main/validator.cpp\
index 4f5594011..a6b977577 100644\
--- a/test/cppsuite/src/main/validator.cpp\
+++ b/test/cppsuite/src/main/validator.cpp\
@@ -45,7 +45,7 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
     int trackedOpType;\
     uint64_t currentCollectionId = 0;\
 \
-    Logger::LogMessage(LOG_INFO, "Beginning validation.");\
+    Logger::LogMessage(LoggingLevel::kInfo, "Beginning validation.");\
 \
     ScopedSession session = ConnectionManager::GetInstance().CreateSession();\
     ScopedCursor cursor = session.OpenScopedCursor(operationTableName);\
@@ -73,7 +73,7 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
      */\
     for (auto const &it : deletedCollections) \{\
         if (!VerifyCollectionFileState(session, it, false))\
-            testutil_die(LOG_ERROR,\
+            testutil_die(LoggingLevel::kError,\
               "Validation failed: collection %s present on disk while it has been tracked as "\
               "deleted.",\
               Database::GenerateCollectionName(it).c_str());\
@@ -86,13 +86,13 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
     std::sort(createdCollections.begin(), createdCollections.end());\
     auto onDiskCollectionId = createdCollections.begin();\
     if (createdCollections.size() != knownCollectionIds.size())\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Validation failed: collection state mismatch, expected %lu"\
           " collections to exist but have %lu on disk",\
           createdCollections.size(), knownCollectionIds.size());\
     for (const auto id : knownCollectionIds) \{\
         if (id != *onDiskCollectionId)\
-            testutil_die(LOG_ERROR,\
+            testutil_die(LoggingLevel::kError,\
               "Validation failed: collection state mismatch expected "\
               "collection id %lu but got %lu.",\
               id, *onDiskCollectionId);\
@@ -106,7 +106,7 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
           cursor->get_key(cursor.Get(), &trackedCollectionId, &trackedKey, &trackedTimestamps));\
         testutil_check(cursor->get_value(cursor.Get(), &trackedOpType, &trackedValue));\
 \
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "Retrieved tracked values. \\n Collection id: " + std::to_string(trackedCollectionId) +\
             "\\n Key: " + std::string(trackedKey) +\
             "\\n Timestamp: " + std::to_string(trackedTimestamps) + "\\n Operation type: " +\
@@ -119,13 +119,13 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
         if (trackedCollectionId != currentCollectionId) \{\
             if (std::find(knownCollectionIds.begin(), knownCollectionIds.end(),\
                   trackedCollectionId) == knownCollectionIds.end())\
-                testutil_die(LOG_ERROR,\
+                testutil_die(LoggingLevel::kError,\
                   "Validation failed: The collection id %lu is not part of the known "\
                   "collection set.",\
                   trackedCollectionId);\
             if (trackedCollectionId < currentCollectionId)\
-                testutil_die(LOG_ERROR, "Validation failed: The collection id %lu is out of order.",\
-                  trackedCollectionId);\
+                testutil_die(LoggingLevel::kError,\
+                  "Validation failed: The collection id %lu is out of order.", trackedCollectionId);\
 \
             /*\
              * Given that we've stepped over to the next collection we've built a full picture of\
@@ -147,8 +147,8 @@ Validator::Validate(const std::string &operationTableName, const std::string &sc\
 \
     /* The value of ret should be WT_NOTFOUND once the cursor has read all rows. */\
     if (ret != WT_NOTFOUND)\
-        testutil_die(\
-          LOG_ERROR, "Validation failed: cursor->next() return an unexpected error %d.", ret);\
+        testutil_die(LoggingLevel::kError,\
+          "Validation failed: cursor->next() return an unexpected error %d.", ret);\
 \
     /*\
      * We still need to validate the last collection. But we can also end up here if there aren't\
@@ -172,9 +172,11 @@ Validator::parseSchemaTrackingTable(ScopedSession &session, const std::string &t\
         testutil_check(cursor->get_key(cursor.Get(), &keyCollectionId, &keyTimestamp));\
         testutil_check(cursor->get_value(cursor.Get(), &valueOperationType));\
 \
-        Logger::LogMessage(LOG_TRACE, "Collection id is " + std::to_string(keyCollectionId));\
-        Logger::LogMessage(LOG_TRACE, "Timestamp is " + std::to_string(keyTimestamp));\
-        Logger::LogMessage(LOG_TRACE, "Operation type is " + std::to_string(valueOperationType));\
+        Logger::LogMessage(\
+          LoggingLevel::kTrace, "Collection id is " + std::to_string(keyCollectionId));\
+        Logger::LogMessage(LoggingLevel::kTrace, "Timestamp is " + std::to_string(keyTimestamp));\
+        Logger::LogMessage(\
+          LoggingLevel::kTrace, "Operation type is " + std::to_string(valueOperationType));\
 \
         if (static_cast<TrackingOperation>(valueOperationType) ==\
           TrackingOperation::kCreateCollection) \{\
@@ -200,12 +202,12 @@ Validator::UpdateDataModel(const TrackingOperation &operation, validation_collec\
         /* Search for the key validating that it exists. */\
         const auto it = collection.find(key);\
         if (it == collection.end())\
-            testutil_die(LOG_ERROR,\
+            testutil_die(LoggingLevel::kError,\
               "Validation failed: key deleted that doesn't exist. Collection id: %lu Key: %s",\
               collectionId, key);\
         else if (it->second.exists == false)\
             /* The key has been deleted twice. */\
-            testutil_die(LOG_ERROR,\
+            testutil_die(LoggingLevel::kError,\
               "Validation failed: deleted key deleted again. Collection id: %lu Key: %s",\
               collectionId, it->first.c_str());\
 \
@@ -214,7 +216,8 @@ Validator::UpdateDataModel(const TrackingOperation &operation, validation_collec\
     \} else if (operation == TrackingOperation::kInsert)\
         collection[key_value_t(key)] = KeyState\{true, key_value_t(value)\};\
     else\
-        testutil_die(LOG_ERROR, "Validation failed: unexpected operation in the tracking table: %d",\
+        testutil_die(LoggingLevel::kError,\
+          "Validation failed: unexpected operation in the tracking table: %d",\
           static_cast<TrackingOperation>(operation));\
 \}\
 \
@@ -224,7 +227,7 @@ Validator::VerifyCollection(\
 \{\
     /* Check the collection exists on disk. */\
     if (!VerifyCollectionFileState(session, collectionId, true))\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Validation failed: collection %lu not present on disk while it has been tracked as "\
           "created.",\
           collectionId);\
@@ -261,12 +264,12 @@ Validator::VerifyKeyValue(ScopedSession &session, const uint64_t collectionId,\
       "collectionId: %lu",\
       ret, key.c_str(), collectionId);\
     if (ret == WT_NOTFOUND && keyState.exists)\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Validation failed: Search failed to find key that should exist. Key: %s, "\
           "collectionId: %lu",\
           key.c_str(), collectionId);\
     else if (ret == 0 && keyState.exists == false) \{\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Validation failed: Key exists when it is expected to be deleted. Key: %s, "\
           "collectionId: %lu",\
           key.c_str(), collectionId);\
@@ -278,7 +281,7 @@ Validator::VerifyKeyValue(ScopedSession &session, const uint64_t collectionId,\
     const char *retrievedValue;\
     testutil_check(cursor->get_value(cursor.Get(), &retrievedValue));\
     if (keyState.value != key_value_t(retrievedValue))\
-        testutil_die(LOG_ERROR,\
+        testutil_die(LoggingLevel::kError,\
           "Validation failed: Value mismatch for key. Key: %s, collectionId: %lu, Expected "\
           "value: %s, Found value: %s",\
           key.c_str(), collectionId, keyState.value.c_str(), retrievedValue);\
diff --git a/test/cppsuite/src/storage/connection_manager.cpp b/test/cppsuite/src/storage/connection_manager.cpp\
index 40eeb52ea..c4af88d8d 100644\
--- a/test/cppsuite/src/storage/connection_manager.cpp\
+++ b/test/cppsuite/src/storage/connection_manager.cpp\
@@ -61,10 +61,10 @@ void\
 ConnectionManager::Create(const std::string &config, const std::string &home)\
 \{\
     if (_connection != nullptr) \{\
-        Logger::LogMessage(LOG_ERROR, "Connection is not NULL, cannot be re-opened.");\
+        Logger::LogMessage(LoggingLevel::kError, "Connection is not NULL, cannot be re-opened.");\
         testutil_die(EINVAL, "Connection is not NULL");\
     \}\
-    Logger::LogMessage(LOG_INFO, "wiredtiger_open config: " + config);\
+    Logger::LogMessage(LoggingLevel::kInfo, "wiredtiger_open config: " + config);\
 \
     /* Create the working dir. */\
     testutil_make_work_dir(home.c_str());\
@@ -77,7 +77,7 @@ ScopedSession\
 ConnectionManager::CreateSession()\
 \{\
     if (_connection == nullptr) \{\
-        Logger::LogMessage(LOG_ERROR,\
+        Logger::LogMessage(LoggingLevel::kError,\
           "Connection is NULL, did you forget to call "\
           "ConnectionManager::create ?");\
         testutil_die(EINVAL, "Connection is NULL");\
diff --git a/test/cppsuite/tests/burst_inserts.cpp b/test/cppsuite/tests/burst_inserts.cpp\
index f5575e263..af7c04ba7 100644\
--- a/test/cppsuite/tests/burst_inserts.cpp\
+++ b/test/cppsuite/tests/burst_inserts.cpp\
@@ -43,7 +43,7 @@ class BurstInserts : public Test \{\
     \{\
         _burstDurationSecs = _config->GetInt("burst_duration");\
         Logger::LogMessage(\
-          LOG_INFO, "Burst duration set to: " + std::to_string(_burstDurationSecs));\
+          LoggingLevel::kInfo, "Burst duration set to: " + std::to_string(_burstDurationSecs));\
         InitOperationTracker();\
     \}\
 \
@@ -54,7 +54,7 @@ class BurstInserts : public Test \{\
     void\
     InsertOperation(ThreadWorker *threadWorker) override final\
     \{\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -144,7 +144,7 @@ class BurstInserts : public Test \{\
             /* Close out our current txn. */\
             if (threadWorker->transaction.Running()) \{\
                 if (threadWorker->transaction.Commit()) \{\
-                    Logger::LogMessage(LOG_TRACE,\
+                    Logger::LogMessage(LoggingLevel::kTrace,\
                       "Committed an insertion of " + std::to_string(addedCount) + " keys.");\
                     cc.collection.IncreaseKeyCount(addedCount);\
                 \}\
diff --git a/test/cppsuite/tests/cache_resize.cpp b/test/cppsuite/tests/cache_resize.cpp\
index 4a39978b1..448a5047d 100644\
--- a/test/cppsuite/tests/cache_resize.cpp\
+++ b/test/cppsuite/tests/cache_resize.cpp\
@@ -91,7 +91,7 @@ class CacheResize : public Test \{\
             /* Get the new cache size. */\
             uint64_t newCacheSize = connectionImpl->cache_size;\
 \
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "The cache size was updated from " + std::to_string(previousCacheSize) + " to " +\
                 std::to_string(newCacheSize));\
 \
@@ -118,7 +118,7 @@ class CacheResize : public Test \{\
             else \{\
                 /* Due to the cache pressure, it is possible to fail when saving the operation. */\
                 testutil_assert(ret == WT_ROLLBACK);\
-                Logger::LogMessage(LOG_WARN,\
+                Logger::LogMessage(LoggingLevel::kWarning,\
                   "The cache size reconfiguration could not be saved in the tracking table, ret: " +\
                     std::to_string(ret));\
                 threadWorker->transaction.Rollback();\
@@ -197,7 +197,7 @@ class CacheResize : public Test \{\
             testutil_check(\
               cursor->get_value(cursor.Get(), &trackedOperationType, &trackedCacheSize));\
 \
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "Timestamp: " + std::to_string(trackedTimestamp) +\
                 ", transaction id: " + std::to_string(trackedTransactionId) +\
                 ", cache size: " + std::to_string(std::stoull(trackedCacheSize)));\
diff --git a/test/cppsuite/tests/csuite_style_example_test.cpp b/test/cppsuite/tests/csuite_style_example_test.cpp\
index 417dbfaad..244df1b4c 100644\
--- a/test/cppsuite/tests/csuite_style_example_test.cpp\
+++ b/test/cppsuite/tests/csuite_style_example_test.cpp\
@@ -56,7 +56,7 @@ bool doReads = false;\
 void\
 InsertOp(WT_CURSOR *cursor, int keySize, int valueSize)\
 \{\
-    Logger::LogMessage(LOG_INFO, "called InsertOp");\
+    Logger::LogMessage(LoggingLevel::kInfo, "called InsertOp");\
 \
     /* Insert random data. */\
     std::string key, value;\
@@ -72,7 +72,7 @@ InsertOp(WT_CURSOR *cursor, int keySize, int valueSize)\
 void\
 ReadOp(WT_CURSOR *cursor, int keySize)\
 \{\
-    Logger::LogMessage(LOG_INFO, "called ReadOp");\
+    Logger::LogMessage(LoggingLevel::kInfo, "called ReadOp");\
 \
     /* Read random data. */\
     std::string key;\
@@ -90,11 +90,11 @@ main(int argc, char *argv[])\
     const std::string progname = testutil_set_progname(argv);\
 \
     /* Set the tracing level for the logger component. */\
-    Logger::traceLevel = LOG_INFO;\
+    Logger::loggingLevel = LoggingLevel::kInfo;\
 \
     /* Printing some messages. */\
-    Logger::LogMessage(LOG_INFO, "Starting " + progname);\
-    Logger::LogMessage(LOG_ERROR, "This could be an error.");\
+    Logger::LogMessage(LoggingLevel::kInfo, "Starting " + progname);\
+    Logger::LogMessage(LoggingLevel::kError, "This could be an error.");\
 \
     /* Create a connection, set the cache size and specify the home directory. */\
     const std::string connectionConfig = kConnectionCreate + ",cache_size=500MB";\
@@ -167,7 +167,7 @@ main(int argc, char *argv[])\
         testutil_check(c->close(c));\
 \
     /* Another message. */\
-    Logger::LogMessage(LOG_INFO, "End of test.");\
+    Logger::LogMessage(LoggingLevel::kInfo, "End of test.");\
 \
     return (0);\
 \}\
diff --git a/test/cppsuite/tests/cursor_bound_01.cpp b/test/cppsuite/tests/cursor_bound_01.cpp\
index 10bec621d..519057d39 100644\
--- a/test/cppsuite/tests/cursor_bound_01.cpp\
+++ b/test/cppsuite/tests/cursor_bound_01.cpp\
@@ -283,7 +283,7 @@ class CursorBound01 : public Test \{\
 \
             const char *key;\
             testutil_check(rangeCursor->get_key(rangeCursor.Get(), &key));\
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "bounded search_near found key: " + std::string(key) +\
                 " with lower bound: " + lowerKey + " upper bound: " + upperKey);\
 \
@@ -334,7 +334,7 @@ class CursorBound01 : public Test \{\
         /* Retrieve the key the normal cursor is pointing at. */\
         const char *key;\
         testutil_check(normalCursor->get_key(normalCursor.Get(), &key));\
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "bounded search_near validating correct returned key with search key inside range as: " +\
             search_key + " and exact: " + std::to_string(rangeExact));\
         /* When exact = 0, the returned key should be equal to the search key. */\
@@ -414,7 +414,7 @@ class CursorBound01 : public Test \{\
         int ret, exact;\
         auto lowerKey = lowerBound.GetKey();\
         auto upperKey = upperBound.GetKey();\
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "bounded search_near found WT_NOTFOUND on lower bound: " + lowerKey + " upper bound: " +\
             upperKey + " traversing range to validate that there are no keys within range.");\
         if (!lowerKey.empty()) \{\
@@ -463,7 +463,7 @@ class CursorBound01 : public Test \{\
     InsertOperation(ThreadWorker *threadWorker) override final\
     \{\
         /* Each insert operation will insert new keys in the collections. */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -513,7 +513,7 @@ class CursorBound01 : public Test \{\
     UpdateOperation(ThreadWorker *threadWorker) override final\
     \{\
         /* Each update operation will update existing keys in the collections. */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -581,7 +581,7 @@ class CursorBound01 : public Test \{\
          * cursor without any bounds set. The normal cursor will be used to validate the results\
          * from the range cursor.\
          */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -656,7 +656,7 @@ class CursorBound01 : public Test \{\
          * in the collection. The records will be validated against with the normal cursor to check\
          * for any potential missing records.\
          */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
diff --git a/test/cppsuite/tests/hs_cleanup.cpp b/test/cppsuite/tests/hs_cleanup.cpp\
index 378eedf72..d4f7c54d0 100644\
--- a/test/cppsuite/tests/hs_cleanup.cpp\
+++ b/test/cppsuite/tests/hs_cleanup.cpp\
@@ -50,7 +50,7 @@ class HsCleanup : public Test \{\
     void\
     UpdateOperation(ThreadWorker *threadWorker) override final\
     \{\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
diff --git a/test/cppsuite/tests/run.cpp b/test/cppsuite/tests/run.cpp\
index 54dc0a255..de4efa1bb 100755\
--- a/test/cppsuite/tests/run.cpp\
+++ b/test/cppsuite/tests/run.cpp\
@@ -123,7 +123,7 @@ RunTest(const std::string &testName, const std::string &config, const std::strin\
 \{\
     int error = 0;\
 \
-    test_harness::Logger::LogMessage(LOG_TRACE, "Configuration\\t:" + config);\
+    test_harness::Logger::LogMessage(LoggingLevel::kTrace, "Configuration\\t:" + config);\
     test_harness::test_args args = \{\
       .testConfig = config, .testName = testName, .wtOpenConfig = wtOpenConfig\};\
 \
@@ -148,12 +148,12 @@ RunTest(const std::string &testName, const std::string &config, const std::strin\
     else if (testName == "test_template")\
         TestTemplate(args).Run();\
     else \{\
-        test_harness::Logger::LogMessage(LOG_ERROR, "Test not found: " + testName);\
+        test_harness::Logger::LogMessage(LoggingLevel::kError, "Test not found: " + testName);\
         error = -1;\
     \}\
 \
     if (error == 0)\
-        test_harness::Logger::LogMessage(LOG_INFO, "Test " + testName + " done.");\
+        test_harness::Logger::LogMessage(LoggingLevel::kInfo, "Test " + testName + " done.");\
 \
     return (error);\
 \}\
@@ -199,7 +199,8 @@ main(int argc, char *argv[])\
                 error = -1;\
         \} else if (std::string(argv[i]) == "-c") \{\
             if (!configFilename.empty()) \{\
-                test_harness::Logger::LogMessage(LOG_ERROR, "Option -C cannot be used with -f");\
+                test_harness::Logger::LogMessage(\
+                  LoggingLevel::kError, "Option -C cannot be used with -f");\
                 error = -1;\
             \} else if ((i + 1) < argc)\
                 cfg = argv[++i];\
@@ -207,7 +208,8 @@ main(int argc, char *argv[])\
                 error = -1;\
         \} else if (std::string(argv[i]) == "-f") \{\
             if (!cfg.empty()) \{\
-                test_harness::Logger::LogMessage(LOG_ERROR, "Option -f cannot be used with -C");\
+                test_harness::Logger::LogMessage(\
+                  LoggingLevel::kError, "Option -f cannot be used with -C");\
                 error = -1;\
             \} else if ((i + 1) < argc)\
                 configFilename = argv[++i];\
@@ -219,21 +221,24 @@ main(int argc, char *argv[])\
             else\
                 error = -1;\
         \} else if (std::string(argv[i]) == "-l") \{\
-            if ((i + 1) < argc)\
-                test_harness::Logger::traceLevel = std::stoi(argv[++i]);\
-            else\
+            if ((i + 1) < argc) \{\
+                int loggingLevel = std::stoi(argv[++i]);\
+                testutil_assert(\
+                  loggingLevel >= LoggingLevel::kError && loggingLevel <= LoggingLevel::kTrace);\
+                test_harness::Logger::loggingLevel = static_cast<LoggingLevel>(loggingLevel);\
+            \} else\
                 error = -1;\
         \} else\
             error = -1;\
     \}\
 \
     if (error == 0) \{\
-        test_harness::Logger::LogMessage(\
-          LOG_INFO, "Trace level: " + std::to_string(test_harness::Logger::traceLevel));\
+        test_harness::Logger::LogMessage(LoggingLevel::kInfo,\
+          "Trace level: " + std::to_string(test_harness::Logger::loggingLevel));\
         std::string currentTestName;\
         if (testName.empty()) \{\
             /* Run all tests. */\
-            test_harness::Logger::LogMessage(LOG_INFO, "Running all tests.");\
+            test_harness::Logger::LogMessage(LoggingLevel::kInfo, "Running all tests.");\
             for (auto const &it : all_tests) \{\
                 currentTestName = it;\
                 /* Configuration parsing. */\
@@ -261,7 +266,7 @@ main(int argc, char *argv[])\
             /* Check the test exists. */\
             if (std::find(all_tests.begin(), all_tests.end(), currentTestName) == all_tests.end()) \{\
                 test_harness::Logger::LogMessage(\
-                  LOG_ERROR, "The test " + currentTestName + " was not found.");\
+                  LoggingLevel::kError, "The test " + currentTestName + " was not found.");\
                 error = -1;\
             \} else \{\
                 /* Configuration parsing. */\
@@ -274,9 +279,10 @@ main(int argc, char *argv[])\
         \}\
 \
         if (error != 0)\
-            test_harness::Logger::LogMessage(LOG_ERROR, "Test " + currentTestName + " failed.");\
+            test_harness::Logger::LogMessage(\
+              LoggingLevel::kError, "Test " + currentTestName + " failed.");\
     \} else\
-        test_harness::Logger::LogMessage(LOG_ERROR,\
+        test_harness::Logger::LogMessage(LoggingLevel::kError,\
           "Invalid command line arguments supplied. Try "\
           "'./run -h' for help.");\
 \
diff --git a/test/cppsuite/tests/search_near_01.cpp b/test/cppsuite/tests/search_near_01.cpp\
index 4705bfeb2..c2d2c020b 100644\
--- a/test/cppsuite/tests/search_near_01.cpp\
+++ b/test/cppsuite/tests/search_near_01.cpp\
@@ -55,7 +55,7 @@ class SearchNear01 : public Test \{\
       ThreadWorker *threadWorker, const std::string &kAlphabet, uint64_t prefixKeyLength)\
     \{\
         Logger::LogMessage(\
-          LOG_INFO, "Populate with thread id: " + std::to_string(threadWorker->id));\
+          LoggingLevel::kInfo, "Populate with thread id: " + std::to_string(threadWorker->id));\
 \
         uint64_t collectionsPerThread = threadWorker->collectionCount;\
         const uint64_t kMaxRollbacks = 100;\
@@ -122,7 +122,7 @@ class SearchNear01 : public Test \{\
         /* Check the prefix length is not greater than the key size. */\
         testutil_assert(keySize >= PREFIX_KEY_LEN);\
 \
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           "Populate configuration with key size: " + std::to_string(keySize) +\
             " key count: " + std::to_string(keysPerPrefix) +\
             " number of collections: " + std::to_string(collection_count));\
@@ -147,7 +147,7 @@ class SearchNear01 : public Test \{\
         \}\
 \
         /* Wait for our populate threads to finish and then join them. */\
-        Logger::LogMessage(LOG_INFO, "Populate: waiting for threads to complete.");\
+        Logger::LogMessage(LoggingLevel::kInfo, "Populate: waiting for threads to complete.");\
         threadManager.Join();\
 \
         /* Cleanup our workers. */\
@@ -177,7 +177,7 @@ class SearchNear01 : public Test \{\
         \}\
         searchKeyLength =\
           RandomGenerator::GetInstance().GenerateInteger(static_cast<uint64_t>(1), PREFIX_KEY_LEN);\
-        Logger::LogMessage(LOG_INFO, "Populate: finished.");\
+        Logger::LogMessage(LoggingLevel::kInfo, "Populate: finished.");\
     \}\
 \
     static void\
@@ -189,7 +189,7 @@ class SearchNear01 : public Test \{\
         /* Generate search prefix key of random length between a -> zzz. */\
         const std::string srch_key = RandomGenerator::GetInstance().GenerateRandomString(\
           searchKeyLength, CharactersType::kAlphabet);\
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "Search near thread \{" + std::to_string(threadWorker->id) +\
             "\} performing prefix search near with key: " + srch_key);\
 \
@@ -241,7 +241,7 @@ class SearchNear01 : public Test \{\
         Configuration *readConfig = workloadConfig->GetSubconfig(kReadOpConfig);\
         zKeySearches = 0;\
 \
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread commencing. Spawning " +\
             std::to_string(threadsCount) + " search near threads.");\
 \
@@ -284,7 +284,7 @@ class SearchNear01 : public Test \{\
               WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100, &entriesStatistics);\
             MetricsMonitor::GetStatistics(threadWorker->statisticsCursor,\
               WT_STAT_CONN_CURSOR_SEARCH_NEAR_PREFIX_FAST_PATHS, &prefixStatistics);\
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               "Read thread skipped entries: " +\
                 std::to_string(entriesStatistics - prevEntriesStatistics) + " prefix early exit: " +\
                 std::to_string(prefixStatistics - prevPrefixStatistics - zKeySearches));\
diff --git a/test/cppsuite/tests/search_near_02.cpp b/test/cppsuite/tests/search_near_02.cpp\
index b76e08862..a6dfe8d16 100644\
--- a/test/cppsuite/tests/search_near_02.cpp\
+++ b/test/cppsuite/tests/search_near_02.cpp\
@@ -57,20 +57,20 @@ class SearchNear02 : public Test \{\
          */\
         int64_t collection_count = config->GetInt(kCollectionCount);\
 \
-        Logger::LogMessage(\
-          LOG_INFO, "Populate: " + std::to_string(collection_count) + " creating collections.");\
+        Logger::LogMessage(LoggingLevel::kInfo,\
+          "Populate: " + std::to_string(collection_count) + " creating collections.");\
 \
         for (uint64_t i = 0; i < collection_count; ++i)\
             database.AddCollection();\
 \
-        Logger::LogMessage(LOG_INFO, "Populate: finished.");\
+        Logger::LogMessage(LoggingLevel::kInfo, "Populate: finished.");\
     \}\
 \
     void\
     InsertOperation(ThreadWorker *threadWorker) override final\
     \{\
         /* Each insert operation will insert new keys in the collections. */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -155,7 +155,7 @@ class SearchNear02 : public Test \{\
          * collections. Each prefix is randomly generated. The result of the search_near call with\
          * prefix enabled is then validated using the search_near call without prefix enabled.\
          */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -285,9 +285,9 @@ class SearchNear02 : public Test \{\
         testutil_check(cursorDefault->get_key(cursorDefault.Get(), &keyDefault));\
         std::string keyDefaultString = keyDefault;\
 \
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "search_near (normal) exact " + std::to_string(exactDefault) + " key " + keyDefault);\
-        Logger::LogMessage(LOG_TRACE,\
+        Logger::LogMessage(LoggingLevel::kTrace,\
           "search_near (prefix) exact " + std::to_string(exactPrefix) + " key " + keyPrefix);\
 \
         /* Example: */\
diff --git a/test/cppsuite/tests/search_near_03.cpp b/test/cppsuite/tests/search_near_03.cpp\
index 09f598304..3bf801ee2 100644\
--- a/test/cppsuite/tests/search_near_03.cpp\
+++ b/test/cppsuite/tests/search_near_03.cpp\
@@ -103,7 +103,7 @@ class SearchNear03 : public Test \{\
     populate_worker(ThreadWorker *threadWorker)\
     \{\
         Logger::LogMessage(\
-          LOG_INFO, "Populate with thread id: " + std::to_string(threadWorker->id));\
+          LoggingLevel::kInfo, "Populate with thread id: " + std::to_string(threadWorker->id));\
 \
         const uint64_t kMaxRollbacks = 100;\
         uint32_t rollbackRetries = 0;\
@@ -154,7 +154,7 @@ class SearchNear03 : public Test \{\
         testutil_assert(keyCount > 0);\
         testutil_assert(keySize > 0);\
 \
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           "Populate configuration with " + std::to_string(collectionCount) +\
             "collections, number of keys: " + std::to_string(keyCount) +\
             ", key size: " + std::to_string(keySize));\
@@ -179,7 +179,7 @@ class SearchNear03 : public Test \{\
         \}\
 \
         /* Wait for our populate threads to finish and then join them. */\
-        Logger::LogMessage(LOG_INFO, "Populate: waiting for threads to complete.");\
+        Logger::LogMessage(LoggingLevel::kInfo, "Populate: waiting for threads to complete.");\
         threadManager.Join();\
 \
         /* Cleanup our workers. */\
@@ -212,7 +212,7 @@ class SearchNear03 : public Test \{\
             \}\
             existingPrefixes.push_back(prefixes);\
         \}\
-        Logger::LogMessage(LOG_INFO, "Populate: finished.");\
+        Logger::LogMessage(LoggingLevel::kInfo, "Populate: finished.");\
     \}\
 \
     void\
@@ -224,7 +224,7 @@ class SearchNear03 : public Test \{\
          * Each insert operation will attempt to perform unique index insertions with an existing\
          * prefix on a collection.\
          */\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
 \
@@ -249,7 +249,7 @@ class SearchNear03 : public Test \{\
               static_cast<size_t>(0), existingPrefixes.at(collection.id).size() - 1);\
             std::string prefixKey =\
               GetPrefixFromKey(existingPrefixes.at(collection.id).at(random_index));\
-            Logger::LogMessage(LOG_TRACE,\
+            Logger::LogMessage(LoggingLevel::kTrace,\
               ThreadTypeToString(threadWorker->type) +\
                 " thread: Perform unique index insertions with existing prefix key " + prefixKey +\
                 ".");\
@@ -265,7 +265,7 @@ class SearchNear03 : public Test \{\
     \{\
         uint64_t keyCount = 0;\
         int ret = 0;\
-        Logger::LogMessage(LOG_INFO,\
+        Logger::LogMessage(LoggingLevel::kInfo,\
           ThreadTypeToString(threadWorker->type) + " thread \{" + std::to_string(threadWorker->id) +\
             "\} commencing.");\
         /*\
@@ -289,7 +289,7 @@ class SearchNear03 : public Test \{\
                 threadWorker->Sleep();\
             \}\
             if (threadWorker->Running()) \{\
-                Logger::LogMessage(LOG_TRACE,\
+                Logger::LogMessage(LoggingLevel::kTrace,\
                   ThreadTypeToString(threadWorker->type) +\
                     " thread: calculated count: " + std::to_string(keyCount) + " expected size: " +\
                     std::to_string(existingPrefixes.size() * existingPrefixes.at(0).size()));\
diff --git a/test/cppsuite/tests/test_template.cpp b/test/cppsuite/tests/test_template.cpp\
index 06155be04..6c17103f0 100644\
--- a/test/cppsuite/tests/test_template.cpp\
+++ b/test/cppsuite/tests/test_template.cpp\
@@ -74,49 +74,49 @@ class TestTemplate : public Test \{\
     void\
     Populate(Database &, TimestampManager *, Configuration *, OperationTracker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "populate: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "populate: nothing done");\
     \}\
 \
     void\
     CheckpointOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "CheckpointOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "CheckpointOperation: nothing done");\
     \}\
 \
     void\
     CustomOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "CustomOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "CustomOperation: nothing done");\
     \}\
 \
     void\
     InsertOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "InsertOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "InsertOperation: nothing done");\
     \}\
 \
     void\
     ReadOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "ReadOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "ReadOperation: nothing done");\
     \}\
 \
     void\
     RemoveOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "RemoveOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "RemoveOperation: nothing done");\
     \}\
 \
     void\
     UpdateOperation(ThreadWorker *) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "UpdateOperation: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "UpdateOperation: nothing done");\
     \}\
 \
     void\
     Validate(const std::string &, const std::string &, const std::vector<uint64_t> &) override final\
     \{\
-        Logger::LogMessage(LOG_WARN, "validate: nothing done");\
+        Logger::LogMessage(LoggingLevel::kWarning, "validate: nothing done");\
     \}\
 \};\
 \
}