Adding DEBUG and message for when device not in whitelist

Following existing model of DEBUG used elsewhere in Entity Manager
Adding an error message to show when device not in whitelist
This should make adding future devices more intuitive
Because some devices not exportable, only appears when DEBUG true

Tested: It worked for me and was very helpful during development

Change-Id: I9ef27e2140a7b6f819550ad9d18f8cd0afe1b768
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 3877ff2..aa06beb 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -38,6 +38,8 @@
 constexpr const char* I2C_DEVS_DIR = "/sys/bus/i2c/devices";
 constexpr const char* MUX_SYMLINK_DIR = "/dev/i2c-mux";
 
+constexpr const bool DEBUG = false;
+
 // some drivers need to be unbind / bind to load device tree changes
 static const boost::container::flat_map<std::string, std::string> FORCE_PROBES =
     {{"IntelFanConnector", "/sys/bus/platform/drivers/aspeed_pwm_tacho"}};
@@ -405,6 +407,17 @@
             if (device != devices::exportTemplates.end())
             {
                 exportDevice(type, device->second, configuration);
+                continue;
+            }
+
+            // Because many devices are intentionally not exportable,
+            // 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 whitelist\n";
             }
         }
     }