From 13f6f0b923ff3ec94a3bec886c28b90402ceef91 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:00:34 +0000 Subject: Migrate the config to hyprlang (#4656) * Migrate to hyprlang * pop up errors * fix swapped args * Meson & Nix: build with hyprlang * CI: add hyprlang to setup action * add infra for plugin stuff * fix hyprctl getoption * fix hyprctl getoption with json * format * fix post parse logic * fix autogen config * oops missed exec-once * fmt * fix ws rules * require 0.3.0 for hyprlang * nix: flaek * minor type fixes * fix cfg usages in swipe * use cvarlist for ws rules * fix throw in addPluginConfigVar * Nix: update hyprlang * minor fixes * fix disableLogs * mention hyprlang docs * bump hyprlang dep in cmake * Meson: bump min hyprlang version Nix: update hyprlang * minor fix * Nix: update meson patch --------- Co-authored-by: Mihai Fufezan --- src/debug/Log.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/debug/Log.hpp') diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index 3d2ed48c..a43d6fee 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -21,16 +21,16 @@ enum LogLevel { }; namespace Debug { - inline std::string logFile; - inline int64_t* disableLogs = nullptr; - inline int64_t* disableTime = nullptr; - inline bool disableStdout = false; - inline bool trace = false; - inline bool shuttingDown = false; + inline std::string logFile; + inline int64_t* const* disableLogs = nullptr; + inline int64_t* const* disableTime = nullptr; + inline bool disableStdout = false; + inline bool trace = false; + inline bool shuttingDown = false; - inline std::string rollingLog = ""; // rolling log contains the ROLLING_LOG_SIZE tail of the log + inline std::string rollingLog = ""; // rolling log contains the ROLLING_LOG_SIZE tail of the log - void init(const std::string& IS); + void init(const std::string& IS); template void log(LogLevel level, std::format_string fmt, Args&&... args) { if (level == TRACE && !trace) @@ -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); -- cgit v1.2.3