diff --git a/meson.build b/meson.build
index ae789a9..93ac8da 100644
--- a/meson.build
+++ b/meson.build
@@ -327,6 +327,7 @@
 
 srcfiles_bmcweb = files(
   'redfish-core/src/error_messages.cpp',
+  'redfish-core/src/registries.cpp',
   'redfish-core/src/utils/json_utils.cpp',
   'src/boost_asio_ssl.cpp',
   'src/boost_asio.cpp',
diff --git a/redfish-core/include/registries.hpp b/redfish-core/include/registries.hpp
index 03e8bc5..bad31c4 100644
--- a/redfish-core/include/registries.hpp
+++ b/redfish-core/include/registries.hpp
@@ -120,4 +120,9 @@
     return response;
 }
 
+const Message* getMessage(std::string_view messageID);
+
+const Message* getMessageFromRegistry(const std::string& messageKey,
+                                      std::span<const MessageEntry> registry);
+
 } // namespace redfish::registries
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 24a0657..34625d3 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -72,51 +72,6 @@
     DUMP_CREATE_INPROGRESS
 };
 
-namespace registries
-{
-static const Message*
-    getMessageFromRegistry(const std::string& messageKey,
-                           const std::span<const MessageEntry> registry)
-{
-    std::span<const MessageEntry>::iterator messageIt =
-        std::find_if(registry.begin(), registry.end(),
-                     [&messageKey](const MessageEntry& messageEntry) {
-        return std::strcmp(messageEntry.first, messageKey.c_str()) == 0;
-        });
-    if (messageIt != registry.end())
-    {
-        return &messageIt->second;
-    }
-
-    return nullptr;
-}
-
-static const Message* getMessage(std::string_view messageID)
-{
-    // Redfish MessageIds are in the form
-    // RegistryName.MajorVersion.MinorVersion.MessageKey, so parse it to find
-    // the right Message
-    std::vector<std::string> fields;
-    fields.reserve(4);
-    bmcweb::split(fields, messageID, '.');
-    const std::string& registryName = fields[0];
-    const std::string& messageKey = fields[3];
-
-    // Find the right registry and check it for the MessageKey
-    if (std::string(base::header.registryPrefix) == registryName)
-    {
-        return getMessageFromRegistry(
-            messageKey, std::span<const MessageEntry>(base::registry));
-    }
-    if (std::string(openbmc::header.registryPrefix) == registryName)
-    {
-        return getMessageFromRegistry(
-            messageKey, std::span<const MessageEntry>(openbmc::registry));
-    }
-    return nullptr;
-}
-} // namespace registries
-
 namespace fs = std::filesystem;
 
 inline std::string translateSeverityDbusToRedfish(const std::string& s)
diff --git a/redfish-core/src/registries.cpp b/redfish-core/src/registries.cpp
new file mode 100644
index 0000000..3bfe059
--- /dev/null
+++ b/redfish-core/src/registries.cpp
@@ -0,0 +1,54 @@
+#include "registries.hpp"
+
+#include "registries/base_message_registry.hpp"
+#include "registries/openbmc_message_registry.hpp"
+#include "str_utility.hpp"
+
+#include <string>
+#include <vector>
+
+namespace redfish::registries
+{
+
+const Message* getMessageFromRegistry(const std::string& messageKey,
+                                      std::span<const MessageEntry> registry)
+{
+    std::span<const MessageEntry>::iterator messageIt =
+        std::find_if(registry.begin(), registry.end(),
+                     [&messageKey](const MessageEntry& messageEntry) {
+        return std::strcmp(messageEntry.first, messageKey.c_str()) == 0;
+        });
+    if (messageIt != registry.end())
+    {
+        return &messageIt->second;
+    }
+
+    return nullptr;
+}
+
+const Message* getMessage(std::string_view messageID)
+{
+    // Redfish MessageIds are in the form
+    // RegistryName.MajorVersion.MinorVersion.MessageKey, so parse it to find
+    // the right Message
+    std::vector<std::string> fields;
+    fields.reserve(4);
+    bmcweb::split(fields, messageID, '.');
+    const std::string& registryName = fields[0];
+    const std::string& messageKey = fields[3];
+
+    // Find the right registry and check it for the MessageKey
+    if (std::string(base::header.registryPrefix) == registryName)
+    {
+        return getMessageFromRegistry(
+            messageKey, std::span<const MessageEntry>(base::registry));
+    }
+    if (std::string(openbmc::header.registryPrefix) == registryName)
+    {
+        return getMessageFromRegistry(
+            messageKey, std::span<const MessageEntry>(openbmc::registry));
+    }
+    return nullptr;
+}
+
+} // namespace redfish::registries
diff --git a/test/redfish-core/include/registries_test.cpp b/test/redfish-core/include/registries_test.cpp
index 5c47128..25f2c60 100644
--- a/test/redfish-core/include/registries_test.cpp
+++ b/test/redfish-core/include/registries_test.cpp
@@ -1,4 +1,5 @@
 #include "registries.hpp"
+#include "registries/openbmc_message_registry.hpp"
 
 #include <gtest/gtest.h> // IWYU pragma: keep
 
@@ -22,5 +23,36 @@
     EXPECT_EQ(fillMessageArgs({}, "%foo"), "");
 }
 
+TEST(RedfishRegistries, GetMessageFromRegistry)
+{
+    const redfish::registries::Message* msg =
+        redfish::registries::getMessageFromRegistry(
+            "Non-Existent", redfish::registries::openbmc::registry);
+    ASSERT_EQ(msg, nullptr);
+
+    const redfish::registries::Message* msg1 =
+        redfish::registries::getMessageFromRegistry(
+            "ServiceStarted", redfish::registries::openbmc::registry);
+    ASSERT_NE(msg1, nullptr);
+
+    EXPECT_EQ(std::string(msg1->description),
+              "Indicates that a service has started successfully.");
+    EXPECT_EQ(std::string(msg1->message),
+              "Service %1 has started successfully.");
+    EXPECT_EQ(std::string(msg1->messageSeverity), "OK");
+    EXPECT_EQ(msg1->numberOfArgs, 1);
+    EXPECT_EQ(std::string(msg1->resolution), "None.");
+}
+
+TEST(RedfishRegistries, GetMessage)
+{
+    const redfish::registries::Message* msg =
+        redfish::registries::getMessage("OpenBMC.1.0.Non_Existent_Message");
+    ASSERT_EQ(msg, nullptr);
+
+    msg = redfish::registries::getMessage("OpenBMC.1.0.ServiceStarted");
+    ASSERT_NE(msg, nullptr);
+}
+
 } // namespace
 } // namespace redfish::registries
