regulators: Create error log entries

Create error log entries when the following regulator operations fail:
* configuration
* presence detection
* sensor monitoring
* closing I2C devices

Use the recently created error_logging_utils namespace to create error
logs based on caught exceptions.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I25824ecfdaa270abbce92b52bdea0602271d926d
diff --git a/phosphor-regulators/src/configuration.cpp b/phosphor-regulators/src/configuration.cpp
index 04babc7..ddf25ba 100644
--- a/phosphor-regulators/src/configuration.cpp
+++ b/phosphor-regulators/src/configuration.cpp
@@ -20,6 +20,7 @@
 #include "action_utils.hpp"
 #include "chassis.hpp"
 #include "device.hpp"
+#include "error_logging_utils.hpp"
 #include "exception_utils.hpp"
 #include "rail.hpp"
 #include "system.hpp"
@@ -72,7 +73,9 @@
         services.getJournal().logError(exception_utils::getMessages(e));
         services.getJournal().logError("Unable to configure " + deviceOrRailID);
 
-        // TODO: Create error log entry
+        // Create error log entry
+        error_logging_utils::logError(std::current_exception(),
+                                      Entry::Level::Warning, services);
     }
 }