meson: use phosphor-logging for debug statements

There is no need to individually patch each file to enable debug
logging.

All the different definitions of 'bool debug' are removed in favor of
using phosphor-logging.

Change-Id: Ia9a8ecfa4ea220f588d7cf2d291b14067e0391e7
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/overlay.cpp b/src/overlay.cpp
index f6d2476..ddbddb4 100644
--- a/src/overlay.cpp
+++ b/src/overlay.cpp
@@ -27,6 +27,7 @@
 #include <boost/container/flat_set.hpp>
 #include <boost/process/child.hpp>
 #include <nlohmann/json.hpp>
+#include <phosphor-logging/lg2.hpp>
 
 #include <filesystem>
 #include <iomanip>
@@ -39,8 +40,6 @@
 constexpr const char* i2CDevsDir = "/sys/bus/i2c/devices";
 constexpr const char* muxSymlinkDir = "/dev/i2c-mux";
 
-constexpr const bool debug = false;
-
 const std::regex illegalNameRegex("[^A-Za-z0-9_]");
 
 // helper function to make json types into string
@@ -315,11 +314,8 @@
             // this error message is not printed in all situations.
             // If wondering why your device not appearing, add your type to
             // the exportTemplates array in the devices.hpp file.
-            if constexpr (debug)
-            {
-                std::cerr << "Device type " << type
-                          << " not found in export map allowlist\n";
-            }
+            lg2::debug("Device type {TYPE} not found in export map allowlist",
+                       "TYPE", type);
         }
     }