diff --git a/src/ietf-hardware/sysrepo/Sysrepo.cpp b/src/ietf-hardware/sysrepo/Sysrepo.cpp
index 2c92237..7b54b33 100644
--- a/src/ietf-hardware/sysrepo/Sysrepo.cpp
+++ b/src/ietf-hardware/sysrepo/Sysrepo.cpp
@@ -29,7 +29,7 @@
             auto hwStateValues = m_hwState->process();
             utils::valuesToYang(hwStateValues, session, parent);
 
-            spdlog::get("main")->trace("Pushing to sysrepo (JSON): {}", parent->print_mem(LYD_FORMAT::LYD_JSON, 0));
+            spdlog::get("hardware")->trace("Pushing to sysrepo (JSON): {}", parent->print_mem(LYD_FORMAT::LYD_JSON, 0));
 
             return SR_ERR_OK;
         },
diff --git a/src/main-firewall.cpp b/src/main-firewall.cpp
index 8cf58a6..973fc27 100644
--- a/src/main-firewall.cpp
+++ b/src/main-firewall.cpp
@@ -51,7 +51,6 @@
         spdlog::get("firewall")->set_level(parseLogLevel("Firewall logging", args["--firewall-log-level"]));
         spdlog::get("sysrepo")->set_level(parseLogLevel("Sysrepo library", args["--sysrepo-log-level"]));
 
-        spdlog::get("main")->debug("Opening Sysrepo connection");
         auto srConn = std::make_shared<sysrepo::Connection>();
         auto srSess = std::make_shared<sysrepo::Session>(srConn);
         velia::firewall::SysrepoFirewall firewall(srSess, [] (const auto& config) {
@@ -63,8 +62,6 @@
 
         waitUntilSignaled();
 
-        spdlog::get("main")->info("Exiting.");
-
         return 0;
     } catch (std::exception& e) {
         velia::utils::fatalException(spdlog::get("main"), e, "main");
diff --git a/src/main-hardware.cpp b/src/main-hardware.cpp
index a03322e..37bec57 100644
--- a/src/main-hardware.cpp
+++ b/src/main-hardware.cpp
@@ -51,13 +51,11 @@
         spdlog::get("sysrepo")->set_level(parseLogLevel("Sysrepo library", args["--sysrepo-log-level"]));
         spdlog::get("hardware")->set_level(parseLogLevel("Hardware loggers", args["--hardware-log-level"]));
 
-        spdlog::get("main")->debug("Opening Sysrepo connection");
         auto srConn = std::make_shared<sysrepo::Connection>();
         auto srSess = std::make_shared<sysrepo::Session>(srConn);
         auto srSubscription = std::make_shared<sysrepo::Subscribe>(srSess);
 
         // initialize ietf-hardware
-        spdlog::get("main")->debug("Initializing IETFHardware module");
         std::shared_ptr<velia::ietf_hardware::IETFHardware> ietfHardware;
         if (const auto& appliance = args["--appliance"]) {
             ietfHardware = velia::ietf_hardware::create(appliance.asString());
@@ -65,7 +63,6 @@
             ietfHardware = std::make_shared<velia::ietf_hardware::IETFHardware>();
         }
 
-        spdlog::get("main")->debug("Initializing Sysrepo ietf-hardware callback");
         auto sysrepoIETFHardware = velia::ietf_hardware::sysrepo::Sysrepo(srSubscription, ietfHardware);
 
         waitUntilSignaled();
diff --git a/src/main-health.cpp b/src/main-health.cpp
index af6ac3f..262fee5 100644
--- a/src/main-health.cpp
+++ b/src/main-health.cpp
@@ -58,22 +58,20 @@
 
         // output configuration
         if (const auto& appliance = args["--appliance"]) {
-            spdlog::get("main")->debug("Initializing LED drivers");
+            spdlog::get("health")->debug("Initializing LED drivers");
             manager->m_outputSignal.connect(velia::health::createOutput(appliance.asString()));
         }
 
-        spdlog::get("main")->debug("All outputs initialized.");
+        spdlog::get("health")->debug("All outputs initialized.");
 
         // input configuration
         std::set<std::string> ignoredUnits(args["--systemd-ignore-unit"].asStringList().begin(), args["--systemd-ignore-unit"].asStringList().end());
-        spdlog::get("main")->debug("Starting DBus systemd watcher");
+        spdlog::get("health")->debug("Starting DBus systemd watcher");
         if (!ignoredUnits.empty()) {
-            spdlog::get("main")->debug("Systemd input will ignore changes of the following units: {}", args["--systemd-ignore-unit"]);
+            spdlog::get("health")->debug("Systemd input will ignore changes of the following units: {}", args["--systemd-ignore-unit"]);
         }
         auto inputSystemdDbus = std::make_shared<velia::health::DbusSystemdInput>(manager, ignoredUnits, *g_dbusConnection);
 
-        spdlog::get("main")->debug("All inputs initialized.");
-
         DBUS_EVENTLOOP_END;
 
         return 0;
diff --git a/src/main-system.cpp b/src/main-system.cpp
index 9128d77..5a1d47b 100644
--- a/src/main-system.cpp
+++ b/src/main-system.cpp
@@ -53,14 +53,12 @@
     try {
         spdlog::get("sysrepo")->set_level(parseLogLevel("Sysrepo library", args["--sysrepo-log-level"]));
 
-        spdlog::get("main")->debug("Opening Sysrepo connection");
         auto srConn = std::make_shared<sysrepo::Connection>();
         auto srSess = std::make_shared<sysrepo::Session>(srConn);
 
         DBUS_EVENTLOOP_START
 
         // initialize ietf-system
-        spdlog::get("main")->debug("Initializing Sysrepo for system models");
         auto sysrepoIETFSystem = velia::system::IETFSystem(srSess, "/etc/os-release");
 
         auto dbusConnection = sdbus::createConnection(); // second connection for RAUC (for calling methods).
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();
diff --git a/src/utils/sysrepo.cpp b/src/utils/sysrepo.cpp
index dc97c52..bd1b506 100644
--- a/src/utils/sysrepo.cpp
+++ b/src/utils/sysrepo.cpp
@@ -54,8 +54,6 @@
 void valuesToYang(const std::map<std::string, std::string>& values, std::shared_ptr<::sysrepo::Session> session, std::shared_ptr<libyang::Data_Node>& parent)
 {
     for (const auto& [propertyName, value] : values) {
-        spdlog::get("main")->trace("propertyName: {}, value: {}", propertyName, value.c_str());
-
         if (!parent) {
             parent = std::make_shared<libyang::Data_Node>(
                 session->get_context(),
diff --git a/src/utils/waitUntilSignalled.cpp b/src/utils/waitUntilSignalled.cpp
index 70fcca5..7c1cd08 100644
--- a/src/utils/waitUntilSignalled.cpp
+++ b/src/utils/waitUntilSignalled.cpp
@@ -6,7 +6,6 @@
  */
 
 #include <csignal>
-#include <spdlog/spdlog.h>
 #include <unistd.h>
 #include "waitUntilSignalled.h"
 
@@ -15,5 +14,4 @@
     signal(SIGTERM, [](int) {});
     signal(SIGINT, [](int) {});
     pause();
-    spdlog::get("main")->debug("Shutting down");
 }
