From 7af2e270fda4f20e3b4687ec07cbc149bb220930 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 14 Feb 2024 16:24:06 +0000 Subject: [PATCH] fix disableLogs --- src/debug/Log.cpp | 2 +- src/debug/Log.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 404904a23..66c430d53 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -22,7 +22,7 @@ void Debug::wlrLog(wlr_log_importance level, const char* fmt, va_list args) { rollingLog += output + "\n"; - if (!disableLogs || !*disableLogs) { + if (!disableLogs || !**disableLogs) { std::ofstream ofs; ofs.open(logFile, std::ios::out | std::ios::app); ofs << "[wlr] " << output << "\n"; diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index a97a4ee3a..a43d6feec 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -52,7 +52,7 @@ namespace Debug { } // print date and time to the ofs - if (disableTime && !*disableTime) { + if (disableTime && !**disableTime) { #ifndef _LIBCPP_VERSION logMsg += std::format("[{:%T}] ", std::chrono::hh_mm_ss{std::chrono::system_clock::now() - std::chrono::floor(std::chrono::system_clock::now())}); #else @@ -73,7 +73,7 @@ namespace Debug { if (rollingLog.size() > ROLLING_LOG_SIZE) rollingLog = rollingLog.substr(rollingLog.size() - ROLLING_LOG_SIZE); - if (!disableLogs || !*disableLogs) { + if (!disableLogs || !**disableLogs) { // log to a file std::ofstream ofs; ofs.open(logFile, std::ios::out | std::ios::app);