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);