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/perform_probe.cpp b/src/perform_probe.cpp
index c49ff7a..c88ed5a 100644
--- a/src/perform_probe.cpp
+++ b/src/perform_probe.cpp
@@ -17,12 +17,11 @@
 #include "entity_manager.hpp"
 
 #include <boost/algorithm/string/replace.hpp>
+#include <phosphor-logging/lg2.hpp>
 
 #include <regex>
 #include <utility>
 
-constexpr const bool debug = false;
-
 // probes dbus interface dictionary for a key with a value that matches a regex
 // When an interface passes a probe, also save its D-Bus path with it.
 bool probeDbus(const std::string& interfaceName,
@@ -63,11 +62,8 @@
         }
         if (deviceMatches)
         {
-            if constexpr (debug)
-            {
-                std::cerr << "probeDBus: Found probe match on " << path << " "
-                          << interfaceName << "\n";
-            }
+            lg2::debug("Found probe match on {PATH} {IFACE}", "PATH", path,
+                       "IFACE", interfaceName);
             devices.emplace_back(interface, path);
             foundMatch = true;
         }