diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-12-18 17:23:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-18 17:23:24 +0000 |
| commit | 6175ecd4c4ba817c4620f66a75e1e11da7c7a8ca (patch) | |
| tree | cf73852f1fc08b1dcee5a3a7380f914aaad9c50a /src/config/ConfigWatcher.cpp | |
| parent | f88deb928a0f7dc02f427473f8c29e8f2bed14a3 (diff) | |
debug: move to hyprutils' logger (#12673)
Diffstat (limited to 'src/config/ConfigWatcher.cpp')
| -rw-r--r-- | src/config/ConfigWatcher.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 <linux/limits.h> #endif #include <sys/inotify.h> -#include "../debug/Log.hpp" +#include "../debug/log/Logger.hpp" #include <ranges> #include <fcntl.h> #include <unistd.h> @@ -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<const inotify_event*>(buffer.data() + offset); if (offset + sizeof(inotify_event) > sc<size_t>(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<size_t>(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, |
