firmware: add logging to factory failures
Add logging to factory failures. This is now possible
with injection available for phosphor-logging.
Change-Id: I77ac959d58e44305d7acf918b656bdd21a9c4da8
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 03cf1c2..f2740c7 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -22,9 +22,12 @@
#include <cstdint>
#include <cstring>
#include <memory>
+#include <phosphor-logging/log.hpp>
#include <string>
#include <vector>
+using namespace phosphor::logging;
+
namespace blobs
{
// systemd service to kick start a target.
@@ -47,6 +50,7 @@
/* There must be at least one. */
if (!firmwares.size())
{
+ log<level::ERR>("Must provide at least one firmware handler.");
return nullptr;
}
if (!transports.size())