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/helpers/AsyncDialogBox.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/helpers/AsyncDialogBox.cpp') diff --git a/src/helpers/AsyncDialogBox.cpp b/src/helpers/AsyncDialogBox.cpp index b3688680..4cef4252 100644 --- a/src/helpers/AsyncDialogBox.cpp +++ b/src/helpers/AsyncDialogBox.cpp @@ -12,7 +12,7 @@ static std::vector>> asyncDialogBoxes; // SP CAsyncDialogBox::create(const std::string& title, const std::string& description, std::vector buttons) { if (!NFsUtils::executableExistsInPath("hyprland-dialog")) { - Debug::log(ERR, "CAsyncDialogBox: cannot create, no hyprland-dialog"); + Log::logger->log(Log::ERR, "CAsyncDialogBox: cannot create, no hyprland-dialog"); return nullptr; } @@ -63,7 +63,7 @@ void CAsyncDialogBox::onWrite(int fd, uint32_t mask) { // TODO: can we avoid this without risking a blocking read()? int fdFlags = fcntl(fd, F_GETFL, 0); if (fcntl(fd, F_SETFL, fdFlags | O_NONBLOCK) < 0) { - Debug::log(ERR, "CAsyncDialogBox::onWrite: fcntl 1 failed!"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::onWrite: fcntl 1 failed!"); return; } @@ -73,13 +73,13 @@ void CAsyncDialogBox::onWrite(int fd, uint32_t mask) { // restore the flags (otherwise libwayland won't give us a hangup) if (fcntl(fd, F_SETFL, fdFlags) < 0) { - Debug::log(ERR, "CAsyncDialogBox::onWrite: fcntl 2 failed!"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::onWrite: fcntl 2 failed!"); return; } } if (mask & (WL_EVENT_HANGUP | WL_EVENT_ERROR)) { - Debug::log(LOG, "CAsyncDialogBox: dialog {:x} hung up, closed."); + Log::logger->log(Log::DEBUG, "CAsyncDialogBox: dialog {:x} hung up, closed."); m_promiseResolver->resolve(m_stdout); std::erase_if(asyncDialogBoxes, [this](const auto& e) { return e.first == m_dialogPid; }); @@ -102,7 +102,7 @@ SP> CAsyncDialogBox::open() { int outPipe[2]; if (pipe(outPipe)) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to pipe()"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to pipe()"); return nullptr; } @@ -113,14 +113,14 @@ SP> CAsyncDialogBox::open() { m_readEventSource = wl_event_loop_add_fd(g_pEventLoopManager->m_wayland.loop, m_pipeReadFd.get(), WL_EVENT_READABLE, ::onFdWrite, this); if (!m_readEventSource) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to add read fd to loop"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to add read fd to loop"); return nullptr; } m_selfReference = m_selfWeakReference.lock(); if (!proc.runAsync()) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to run async"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to run async"); wl_event_source_remove(m_readEventSource); return nullptr; } -- cgit v1.2.3