From 6175ecd4c4ba817c4620f66a75e1e11da7c7a8ca Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:23:24 +0000 Subject: debug: move to hyprutils' logger (#12673) --- src/config/ConfigWatcher.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/config/ConfigWatcher.cpp') diff --git a/src/config/ConfigWatcher.cpp b/src/config/ConfigWatcher.cpp index dfd84b43..83f3011c 100644 --- a/src/config/ConfigWatcher.cpp +++ b/src/config/ConfigWatcher.cpp @@ -3,7 +3,7 @@ #include #endif #include -#include "../debug/Log.hpp" +#include "../debug/log/Logger.hpp" #include #include #include @@ -13,14 +13,14 @@ using namespace Hyprutils::OS; CConfigWatcher::CConfigWatcher() : m_inotifyFd(inotify_init()) { if (!m_inotifyFd.isValid()) { - Debug::log(ERR, "CConfigWatcher couldn't open an inotify node. Config will not be automatically reloaded"); + Log::logger->log(Log::ERR, "CConfigWatcher couldn't open an inotify node. Config will not be automatically reloaded"); return; } // TODO: make CFileDescriptor take F_GETFL, F_SETFL const int FLAGS = fcntl(m_inotifyFd.get(), F_GETFL, 0); if (fcntl(m_inotifyFd.get(), F_SETFL, FLAGS | O_NONBLOCK) < 0) { - Debug::log(ERR, "CConfigWatcher couldn't non-block inotify node. Config will not be automatically reloaded"); + Log::logger->log(Log::ERR, "CConfigWatcher couldn't non-block inotify node. Config will not be automatically reloaded"); m_inotifyFd.reset(); return; } @@ -78,19 +78,19 @@ void CConfigWatcher::onInotifyEvent() { const auto* ev = rc(buffer.data() + offset); if (offset + sizeof(inotify_event) > sc(bytesRead)) { - Debug::log(ERR, "CConfigWatcher: malformed inotify event, truncated header"); + Log::logger->log(Log::ERR, "CConfigWatcher: malformed inotify event, truncated header"); break; } if (offset + sizeof(inotify_event) + ev->len > sc(bytesRead)) { - Debug::log(ERR, "CConfigWatcher: malformed inotify event, truncated name field"); + Log::logger->log(Log::ERR, "CConfigWatcher: malformed inotify event, truncated name field"); break; } const auto WD = std::ranges::find_if(m_watches, [wd = ev->wd](const auto& e) { return e.wd == wd; }); if (WD == m_watches.end()) - Debug::log(ERR, "CConfigWatcher: got an event for wd {} which we don't have?!", ev->wd); + Log::logger->log(Log::ERR, "CConfigWatcher: got an event for wd {} which we don't have?!", ev->wd); else m_watchCallback(SConfigWatchEvent{ .file = WD->file, -- cgit v1.2.3