This commit is contained in:
Vaxry 2025-11-23 01:20:00 +00:00
parent fe829f2913
commit c052d6a865
Signed by: vaxry
GPG key ID: 665806380871D640
2 changed files with 7 additions and 2 deletions

View file

@ -66,6 +66,8 @@ void CLogger::log(eLogLevel level, const std::string_view& msg) {
if (level == LOG_TRACE && !m_trace)
return;
std::lock_guard<std::mutex> lg(m_impl->m_logMtx);
std::string logPrefix = "", logPrefixColor = "";
std::string logMsg = "";

View file

@ -1,6 +1,7 @@
#include <hyprutils/cli/Logger.hpp>
#include <fstream>
#include <filesystem>
#include <mutex>
namespace Hyprutils::CLI {
class CLoggerImpl {
@ -24,6 +25,8 @@ namespace Hyprutils::CLI {
bool m_fileEnabled = false;
bool m_colorEnabled = true;
std::mutex m_logMtx;
// this is fine because CLogger is NOMOVE and NOCOPY
CLogger* m_parent = nullptr;
};