Use sdeventplus

Start using the sdeventplus event mechanisms so that future code
can take advantage of it for things like timers and other events.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6ffe80266257bfd3512a5b848c47f5ccfb5206e8
diff --git a/log_manager_main.cpp b/log_manager_main.cpp
index ddcb063..42eb982 100644
--- a/log_manager_main.cpp
+++ b/log_manager_main.cpp
@@ -6,10 +6,13 @@
 #include <experimental/filesystem>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/manager.hpp>
+#include <sdeventplus/event.hpp>
 
 int main(int argc, char* argv[])
 {
     auto bus = sdbusplus::bus::new_default();
+    auto event = sdeventplus::Event::get_default();
+    bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
 
     // Add sdbusplus ObjectManager for the 'root' path of the logging manager.
     sdbusplus::server::manager::manager objManager(bus, OBJ_LOGGING);
@@ -40,11 +43,5 @@
         }
     }
 
-    while (true)
-    {
-        bus.process_discard();
-        bus.wait();
-    }
-
-    return 0;
+    return event.loop();
 }