diff --git a/cable.cpp b/cable.cpp
index 6253579..5574554 100644
--- a/cable.cpp
+++ b/cable.cpp
@@ -19,6 +19,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -49,8 +50,7 @@
     // data should have [len][ifName]
     if (data.size() < sizeof(struct CableRequest))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
@@ -60,16 +60,15 @@
     // Sanity check the object contents.
     if (request->ifNameLength == 0)
     {
-        std::fprintf(stderr, "Invalid string length: %d\n",
-                     request->ifNameLength);
+        stdplus::print(stderr, "Invalid string length: {}\n",
+                       request->ifNameLength);
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     // Verify the request buffer contains the object and the string.
     if (data.size() < (sizeof(struct CableRequest) + request->ifNameLength))
     {
-        std::fprintf(stderr, "*dataLen too small: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "*dataLen too small: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
diff --git a/cpld.cpp b/cpld.cpp
index a6e30e5..4c1dae1 100644
--- a/cpld.cpp
+++ b/cpld.cpp
@@ -19,6 +19,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstring>
 #include <span>
@@ -43,8 +44,7 @@
 
     if (data.size() < sizeof(request))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
diff --git a/entity_name.cpp b/entity_name.cpp
index 8048ce8..8d12bfe 100644
--- a/entity_name.cpp
+++ b/entity_name.cpp
@@ -19,6 +19,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -53,8 +54,7 @@
 
     if (data.size() < sizeof(request))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
@@ -75,7 +75,7 @@
     // TODO (jaghu) : Add a call to get getChannelMaxTransferSize.
     if (length > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr, "Response would overflow response buffer\n");
+        stdplus::print(stderr, "Response would overflow response buffer\n");
         return ::ipmi::responseInvalidCommand();
     }
 
diff --git a/eth.cpp b/eth.cpp
index 0c76106..8ee1397 100644
--- a/eth.cpp
+++ b/eth.cpp
@@ -18,6 +18,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -46,13 +47,13 @@
     std::string device = std::get<1>(details);
     if (device.length() == 0)
     {
-        std::fprintf(stderr, "Invalid eth string\n");
+        stdplus::print(stderr, "Invalid eth string\n");
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     if ((sizeof(struct EthDeviceReply) + device.length()) > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr, "Response would overflow response buffer\n");
+        stdplus::print(stderr, "Response would overflow response buffer\n");
         return ::ipmi::responseRetBytesUnavailable();
     }
 
diff --git a/google_accel_oob.cpp b/google_accel_oob.cpp
index 8207f6e..7e44864 100644
--- a/google_accel_oob.cpp
+++ b/google_accel_oob.cpp
@@ -17,6 +17,7 @@
 #include "commands.hpp"
 
 #include <sdbusplus/bus.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -50,17 +51,18 @@
 
     if (data.size_bytes() < sizeof(Request))
     {
-        std::fprintf(stderr, "AccelOob DeviceCount command too small: %zu\n",
-                     data.size_bytes());
+        stdplus::print(stderr, "AccelOob DeviceCount command too small: {}\n",
+                       data.size_bytes());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     if (data.size_bytes() + sizeof(Reply) > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr,
-                     "AccelOob DeviceCount command too large for reply buffer: "
-                     "command=%zuB, payload=%zuB, max=%dB\n",
-                     data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
+        stdplus::print(
+            stderr,
+            "AccelOob DeviceCount command too large for reply buffer: "
+            "command={}B, payload={}B, max={}B\n",
+            data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
         return ::ipmi::responseReqDataLenExceeded();
     }
 
@@ -90,17 +92,18 @@
 
     if (data.size_bytes() < sizeof(Request))
     {
-        std::fprintf(stderr, "AccelOob DeviceName command too small: %zu\n",
-                     data.size_bytes());
+        stdplus::print(stderr, "AccelOob DeviceName command too small: {}\n",
+                       data.size_bytes());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     if (data.size_bytes() + sizeof(Reply) > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr,
-                     "AccelOob DeviceName command too large for reply buffer: "
-                     "command=%zuB, payload=%zuB, max=%dB\n",
-                     data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
+        stdplus::print(
+            stderr,
+            "AccelOob DeviceName command too large for reply buffer: "
+            "command={}B, payload={}B, max={}B\n",
+            data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
         return ::ipmi::responseReqDataLenExceeded();
     }
 
@@ -109,10 +112,10 @@
 
     if (name.size() > MAX_NAME_SIZE)
     {
-        std::fprintf(stderr,
-                     "AccelOob: name was too long. "
-                     "'%s' len must be <= %zu\n",
-                     name.c_str(), MAX_NAME_SIZE);
+        stdplus::print(stderr,
+                       "AccelOob: name was too long. "
+                       "'{}' len must be <= {}\n",
+                       name, MAX_NAME_SIZE);
         return ::ipmi::responseReqDataTruncated();
     }
 
@@ -192,10 +195,10 @@
         uint64_t data;
     } __attribute__((packed));
 
-    std::fprintf(stderr,
-                 "AccelOob Read command sizes: "
-                 "command=%zuB, payload=%zuB, max=%dB\n",
-                 data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
+    stdplus::print(stderr,
+                   "AccelOob Read command sizes: "
+                   "command={}B, payload={}B, max={}B\n",
+                   data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
 
     std::string name;
     const uint8_t* payload;
@@ -204,17 +207,17 @@
                                      sizeof(Request), &name, &payload);
     if (min_size != 0)
     {
-        std::fprintf(stderr, "AccelOob Read command too small: %zuB < %zuB\n",
-                     data.size_bytes(), min_size);
+        stdplus::print(stderr, "AccelOob Read command too small: {}B < {}B\n",
+                       data.size_bytes(), min_size);
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     if (data.size_bytes() + sizeof(Reply) > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr,
-                     "AccelOob Read command too large for reply buffer: "
-                     "command=%zuB, payload=%zuB, max=%dB\n",
-                     data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
+        stdplus::print(stderr,
+                       "AccelOob Read command too large for reply buffer: "
+                       "command={}B, payload={}B, max={}B\n",
+                       data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
         return ::ipmi::responseReqDataLenExceeded();
     }
 
@@ -256,17 +259,17 @@
                                      sizeof(Request), &name, &payload);
     if (min_size != 0)
     {
-        std::fprintf(stderr, "AccelOob Write command too small: %zuB < %zuB\n",
-                     data.size_bytes(), min_size);
+        stdplus::print(stderr, "AccelOob Write command too small: {}B < {}B\n",
+                       data.size_bytes(), min_size);
         return ::ipmi::responseReqDataLenInvalid();
     }
 
     if (data.size_bytes() + sizeof(Reply) > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr,
-                     "AccelOob Write command too large for reply buffer: "
-                     "command=%zuB, payload=%zuB, max=%dB\n",
-                     data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
+        stdplus::print(stderr,
+                       "AccelOob Write command too large for reply buffer: "
+                       "command={}B, payload={}B, max={}B\n",
+                       data.size_bytes(), sizeof(Reply), MAX_IPMI_BUFFER);
         return ::ipmi::responseReqDataLenExceeded();
     }
 
diff --git a/handler.cpp b/handler.cpp
index 9a6ac04..5e65e07 100644
--- a/handler.cpp
+++ b/handler.cpp
@@ -11,6 +11,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+
 #include "handler.hpp"
 
 #include "bm_config.h"
@@ -31,6 +32,7 @@
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
+#include <stdplus/print.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
 #include <cinttypes>
@@ -76,9 +78,9 @@
 
     if (fs->exists(bmDriveCleaningDoneAckFlagPath, ec))
     {
-        std::fprintf(
+        stdplus::print(
             stderr,
-            "%s exists so we acked cleaning done and must be in BM mode\n",
+            "{} exists so we acked cleaning done and must be in BM mode\n",
             bmDriveCleaningDoneAckFlagPath);
         return static_cast<uint8_t>(BmcMode::BM_MODE);
     }
@@ -87,9 +89,9 @@
     {
         fs->rename(bmDriveCleaningDoneFlagPath, bmDriveCleaningDoneAckFlagPath,
                    ec);
-        std::fprintf(
+        stdplus::print(
             stderr,
-            "%s exists so we just finished cleaning and must be in BM mode\n",
+            "{} exists so we just finished cleaning and must be in BM mode\n",
             bmDriveCleaningDoneFlagPath);
         return static_cast<uint8_t>(BmcMode::BM_MODE);
     }
@@ -101,14 +103,14 @@
             fs->create(bmDriveCleaningFlagPath);
         }
 
-        std::fprintf(
+        stdplus::print(
             stderr,
-            "%s exists and no done/ack flag, we must be in BM cleaning mode\n",
+            "{} exists and no done/ack flag, we must be in BM cleaning mode\n",
             BM_SIGNAL_PATH);
         return static_cast<uint8_t>(BmcMode::BM_CLEANING_MODE);
     }
 
-    std::fprintf(
+    stdplus::print(
         stderr,
         "Unable to find any BM state files so we must not be in BM mode\n");
     return static_cast<uint8_t>(BmcMode::NON_BM_MODE);
@@ -143,14 +145,14 @@
     // Basically you can't easily inject ../ or /../ into the path below.
     if (name.find("/") != std::string::npos)
     {
-        std::fprintf(stderr, "Invalid or illegal name: '%s'\n", name.c_str());
+        stdplus::print(stderr, "Invalid or illegal name: '{}'\n", name);
         throw IpmiException(::ipmi::ccInvalidFieldRequest);
     }
 
     std::error_code ec;
     if (!this->getFs()->exists(path, ec))
     {
-        std::fprintf(stderr, "Path: '%s' doesn't exist.\n", path.c_str());
+        stdplus::print(stderr, "Path: '{}' doesn't exist.\n", path);
         throw IpmiException(::ipmi::ccInvalidFieldRequest);
     }
     // We're uninterested in the state of ec.
@@ -180,8 +182,7 @@
     std::error_code ec;
     if (!this->getFs()->exists(opath.str(), ec))
     {
-        std::fprintf(stderr, "Path: '%s' doesn't exist.\n",
-                     opath.str().c_str());
+        stdplus::print(stderr, "Path: '{}' doesn't exist.\n", opath.str());
         throw IpmiException(::ipmi::ccInvalidFieldRequest);
     }
     // We're uninterested in the state of ec.
@@ -209,7 +210,7 @@
                                  &std::get<2>(version), &std::get<3>(version));
     if (num_fields == 0)
     {
-        std::fprintf(stderr, "Invalid version.\n");
+        stdplus::print(stderr, "Invalid version.\n");
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
 
@@ -228,14 +229,14 @@
     ofs.open(TIME_DELAY_FILENAME, std::ofstream::out);
     if (!ofs.good())
     {
-        std::fprintf(stderr, "Unable to open file for output.\n");
+        stdplus::print(stderr, "Unable to open file for output.\n");
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
 
     ofs << "PSU_HARDRESET_DELAY=" << delay << std::endl;
     if (ofs.fail())
     {
-        std::fprintf(stderr, "Write failed\n");
+        stdplus::print(stderr, "Write failed\n");
         ofs.close();
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
@@ -270,7 +271,7 @@
     ofs.open(RESET_ON_SHUTDOWN_FILENAME, std::ofstream::out);
     if (!ofs.good())
     {
-        std::fprintf(stderr, "Unable to open file for output.\n");
+        stdplus::print(stderr, "Unable to open file for output.\n");
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
     ofs.close();
@@ -331,7 +332,7 @@
     std::ifstream ifs(path);
     if (ifs.fail())
     {
-        std::fprintf(stderr, "Failed to open: %s\n", path);
+        stdplus::print(stderr, "Failed to open: {}\n", path);
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
 
@@ -341,13 +342,13 @@
         std::getline(ifs, line);
         if (ifs.eof())
         {
-            std::fprintf(stderr, "Failed to find OPENBMC_TARGET_MACHINE: %s\n",
-                         path);
+            stdplus::print(stderr,
+                           "Failed to find OPENBMC_TARGET_MACHINE: {}\n", path);
             throw IpmiException(::ipmi::ccInvalidCommand);
         }
         if (ifs.fail())
         {
-            std::fprintf(stderr, "Failed to read: %s\n", path);
+            stdplus::print(stderr, "Failed to read: {}\n", path);
             throw IpmiException(::ipmi::ccUnspecifiedError);
         }
         std::string_view lineView(line);
@@ -376,7 +377,7 @@
     ofs.open(HOST_TIME_DELAY_FILENAME, std::ofstream::out);
     if (!ofs.good())
     {
-        std::fprintf(stderr, "Unable to open file for output.\n");
+        stdplus::print(stderr, "Unable to open file for output.\n");
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
 
@@ -384,7 +385,7 @@
     ofs.close();
     if (ofs.fail())
     {
-        std::fprintf(stderr, "Write failed\n");
+        stdplus::print(stderr, "Write failed\n");
         throw IpmiException(::ipmi::ccUnspecifiedError);
     }
 
diff --git a/host_power_off.cpp b/host_power_off.cpp
index fa3a37d..7f5b393 100644
--- a/host_power_off.cpp
+++ b/host_power_off.cpp
@@ -19,6 +19,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -37,8 +38,7 @@
 
     if (data.size() < sizeof(request))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
diff --git a/ipmi.cpp b/ipmi.cpp
index 8e47c45..2c765be 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -34,6 +34,7 @@
 
 #include <ipmid/api-types.hpp>
 #include <ipmid/message.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstdio>
@@ -87,7 +88,7 @@
         case SysLinuxBootDone:
             return linuxBootDone(data, handler);
         default:
-            std::fprintf(stderr, "Invalid subcommand: 0x%x\n", cmd);
+            stdplus::print(stderr, "Invalid subcommand: {:#x}\n", cmd);
             return ::ipmi::responseInvalidCommand();
     }
 }
diff --git a/machine_name.cpp b/machine_name.cpp
index c06ce5c..cc2bdee 100644
--- a/machine_name.cpp
+++ b/machine_name.cpp
@@ -18,6 +18,7 @@
 #include "errors.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstddef>
 #include <cstdio>
@@ -50,7 +51,7 @@
     size_t len = sizeof(struct GetMachineNameReply) + machineName->size();
     if (len > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr, "Response would overflow response buffer\n");
+        stdplus::print(stderr, "Response would overflow response buffer\n");
         return ::ipmi::responseInvalidCommand();
     }
 
diff --git a/main.cpp b/main.cpp
index 061c15f..69d9c04 100644
--- a/main.cpp
+++ b/main.cpp
@@ -20,6 +20,7 @@
 #include <ipmid/api-types.hpp>
 #include <ipmid/handler.hpp>
 #include <ipmid/iana.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstdio>
@@ -45,9 +46,9 @@
 {
     static Handler handlerImpl;
 
-    std::fprintf(stderr,
-                 "Registering OEM:[%#08X], Cmd:[%#04X] for Sys Commands\n",
-                 oem::googOemNumber, oem::google::sysCmd);
+    stdplus::print(
+        stderr, "Registering OEM:[{:#08X}], Cmd:[{:#04X}] for Sys Commands\n",
+        oem::googOemNumber, oem::google::sysCmd);
 
     ::ipmi::registerOemHandler(::ipmi::prioOemBase, oem::googOemNumber,
                                oem::google::sysCmd, ::ipmi::Privilege::User,
diff --git a/meson.build b/meson.build
index f68c882..407f257 100644
--- a/meson.build
+++ b/meson.build
@@ -57,6 +57,7 @@
     dependency('phosphor-dbus-interfaces'),
     dependency('phosphor-logging'),
     dependency('sdbusplus'),
+    dependency('stdplus'),
     bifurcation_dep,
   ])
 
diff --git a/pcie_bifurcation.cpp b/pcie_bifurcation.cpp
index dade4ed..4722853 100644
--- a/pcie_bifurcation.cpp
+++ b/pcie_bifurcation.cpp
@@ -23,6 +23,7 @@
 #include <fmt/format.h>
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <span>
 #include <vector>
@@ -59,7 +60,7 @@
 
     if (length > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr, "Response would overflow response buffer\n");
+        stdplus::print(stderr, "Response would overflow response buffer\n");
         return ::ipmi::responseInvalidCommand();
     }
 
diff --git a/pcie_i2c.cpp b/pcie_i2c.cpp
index 854609c..0f95992 100644
--- a/pcie_i2c.cpp
+++ b/pcie_i2c.cpp
@@ -18,6 +18,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -59,8 +60,7 @@
 
     if (data.size() < sizeof(request))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
@@ -92,7 +92,7 @@
     // value and change error to IPMI_CC_REQUESTED_TOO_MANY_BYTES.
     if (length > MAX_IPMI_BUFFER)
     {
-        std::fprintf(stderr, "Response would overflow response buffer\n");
+        stdplus::print(stderr, "Response would overflow response buffer\n");
         return ::ipmi::responseInvalidCommand();
     }
 
diff --git a/psu.cpp b/psu.cpp
index 7f7a5b3..280dbe0 100644
--- a/psu.cpp
+++ b/psu.cpp
@@ -19,6 +19,7 @@
 #include "handler.hpp"
 
 #include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
 
 #include <cstdint>
 #include <cstring>
@@ -37,8 +38,7 @@
 
     if (data.size() < sizeof(request))
     {
-        std::fprintf(stderr, "Invalid command length: %u\n",
-                     static_cast<uint32_t>(data.size()));
+        stdplus::print(stderr, "Invalid command length: {}\n", data.size());
         return ::ipmi::responseReqDataLenInvalid();
     }
 
diff --git a/test/handler_unittest.cpp b/test/handler_unittest.cpp
index b385321..549f1d0 100644
--- a/test/handler_unittest.cpp
+++ b/test/handler_unittest.cpp
@@ -21,6 +21,7 @@
 #include <nlohmann/json.hpp>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
+#include <stdplus/print.hpp>
 
 #include <charconv>
 #include <filesystem>
@@ -164,12 +165,13 @@
 
 ACTION_P(TraceDbus, msg)
 {
-    std::fprintf(stderr, "%s\n", msg);
+    stdplus::print(stderr, "{}\n", msg);
 }
 
 ACTION_P(TraceDbus2, msg)
 {
-    std::fprintf(stderr, "%s(%02x)\n", msg, *static_cast<const uint8_t*>(arg2));
+    stdplus::print(stderr, "{}({:02x})\n", msg,
+                   *static_cast<const uint8_t*>(arg2));
 }
 
 constexpr char object_path[] = "/com/google/customAccel/test/path";
diff --git a/util.cpp b/util.cpp
index 95e4d12..27b6b79 100644
--- a/util.cpp
+++ b/util.cpp
@@ -16,6 +16,7 @@
 
 #include <nlohmann/json.hpp>
 #include <phosphor-logging/elog-errors.hpp>
+#include <stdplus/print.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
 #include <cstdint>
@@ -81,7 +82,7 @@
         }
         else
         {
-            std::fprintf(stderr, "Unable to read file %s.\n", fileName.c_str());
+            stdplus::print(stderr, "Unable to read file {}.\n", fileName);
         }
     }
 
