diff --git a/activation.cpp b/activation.cpp
index 87e5d2b..11c7b32 100755
--- a/activation.cpp
+++ b/activation.cpp
@@ -205,7 +205,7 @@
     if (mapperResponseMsg.is_method_error())
     {
         log<level::ERR>("Error in Get Delete Object",
-                        entry("VERSIONPATH=%s", path));
+                        entry("VERSIONPATH=%s", path.c_str()));
         return;
     }
     std::map<std::string, std::vector<std::string>> mapperResponse;
@@ -213,7 +213,7 @@
     if (mapperResponse.begin() == mapperResponse.end())
     {
         log<level::ERR>("ERROR in reading the mapper response",
-                        entry("VERSIONPATH=%s", path));
+                        entry("VERSIONPATH=%s", path.c_str()));
         return;
     }
 
@@ -227,7 +227,7 @@
     if (mapperResponseMsg.is_method_error())
     {
         log<level::ERR>("Error in Deleting image from image manager",
-                        entry("VERSIONPATH=%s", path));
+                        entry("VERSIONPATH=%s", path.c_str()));
         return;
     }
 }
diff --git a/item_updater.cpp b/item_updater.cpp
index ad8f264..a3b1c9c 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -94,7 +94,7 @@
     if (pos == std::string::npos)
     {
         log<level::ERR>("No version id found in object path",
-                        entry("OBJPATH=%s", path));
+                        entry("OBJPATH=%s", path.c_str()));
         return;
     }
 
@@ -160,7 +160,7 @@
             if (!fs::is_regular_file(pnorTOC))
             {
                 log<level::ERR>("Failed to read pnorTOC.",
-                                entry("FILENAME=%s", pnorTOC.string()));
+                                entry("FILENAME=%s", pnorTOC.c_str()));
                 ItemUpdater::erase(id);
                 continue;
             }
@@ -170,7 +170,7 @@
             if (version.empty())
             {
                 log<level::ERR>("Failed to read version from pnorTOC",
-                                entry("FILENAME=%s", pnorTOC.string()));
+                                entry("FILENAME=%s", pnorTOC.c_str()));
                 activationState = server::Activation::Activations::Invalid;
             }
 
@@ -178,7 +178,7 @@
             if (extendedVersion.empty())
             {
                 log<level::ERR>("Failed to read extendedVersion from pnorTOC",
-                                entry("FILENAME=%s", pnorTOC.string()));
+                                entry("FILENAME=%s", pnorTOC.c_str()));
                 activationState = server::Activation::Activations::Invalid;
             }
 
@@ -210,7 +210,7 @@
                 if (!restoreFromFile(id, priority))
                 {
                     log<level::ERR>("Unable to restore priority from file.",
-                                    entry("VERSIONID=%s", id));
+                                    entry("VERSIONID=%s", id.c_str()));
                 }
                 activations.find(id)->second->redundancyPriority =
                     std::make_unique<RedundancyPriority>(
@@ -233,7 +233,7 @@
             if (!fs::is_directory(roDir))
             {
                 log<level::ERR>("No corresponding read-only volume found.",
-                                entry("DIRNAME=%s", roDir));
+                                entry("DIRNAME=%s", roDir.c_str()));
                 ItemUpdater::erase(id);
             }
         }
@@ -309,7 +309,7 @@
         if (reply.is_method_error())
         {
             log<level::ERR>("Failed to clear read-write partitions",
-                            entry("SERVICE_FILE=%s", serviceFile));
+                            entry("SERVICE_FILE=%s", serviceFile.c_str()));
             elog<InternalFailure>();
         }
     }
