Reduce logging a bit
Now that there's no --log-level flag, a lot of these daemons are using
just two loggers. In case of the "hardware" service, it's the "sysrepo"
one and the "hardware" one, for example. Do not attempt to log
debug/trace messages via "main", that's useless as they are silently
discarded.
The critical exceptions are still logged via "main", that's OK because
of the default log level.
Also remove some log messages which are really not that informative. I
can imagine they were useful when writing this, but let's hope that we
won't be debugging failures such as "not being able to connect to
D-Bus", etc. These logs were now getting silently discarded anyway.
Change-Id: Ic6e7a8f79d1f2d51992b36c9e53fb568a8727e25
Fixes: 3da1467 ("Get rid of the --log-level option")
diff --git a/src/main.h b/src/main.h
index 7c60acb..7e787c0 100644
--- a/src/main.h
+++ b/src/main.h
@@ -10,7 +10,6 @@
std::thread g_eventLoop;
#define DBUS_EVENTLOOP_START \
- spdlog::get("main")->debug("Opening DBus connection"); \
g_dbusConnection = sdbus::createSystemBusConnection(); \
/* Gracefully leave dbus event loop on SIGTERM */ \
struct sigaction sigact; \
@@ -19,9 +18,7 @@
sigact.sa_flags = SA_SIGINFO; \
sigact.sa_handler = [](int) { g_dbusConnection->leaveEventLoop(); }; \
sigaction(SIGTERM, &sigact, nullptr); \
- spdlog::get("main")->debug("Starting DBus event loop"); \
g_eventLoop = std::thread([] { g_dbusConnection->enterEventLoop(); }); \
#define DBUS_EVENTLOOP_END \
- g_eventLoop.join(); \
- spdlog::get("main")->debug("Shutting down");
+ g_eventLoop.join();