mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-26 07:29:49 +01:00
fix disableLogs
This commit is contained in:
parent
3566efa667
commit
7af2e270fd
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ void Debug::wlrLog(wlr_log_importance level, const char* fmt, va_list args) {
|
||||||
|
|
||||||
rollingLog += output + "\n";
|
rollingLog += output + "\n";
|
||||||
|
|
||||||
if (!disableLogs || !*disableLogs) {
|
if (!disableLogs || !**disableLogs) {
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(logFile, std::ios::out | std::ios::app);
|
ofs.open(logFile, std::ios::out | std::ios::app);
|
||||||
ofs << "[wlr] " << output << "\n";
|
ofs << "[wlr] " << output << "\n";
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
// print date and time to the ofs
|
// print date and time to the ofs
|
||||||
if (disableTime && !*disableTime) {
|
if (disableTime && !**disableTime) {
|
||||||
#ifndef _LIBCPP_VERSION
|
#ifndef _LIBCPP_VERSION
|
||||||
logMsg += std::format("[{:%T}] ", std::chrono::hh_mm_ss{std::chrono::system_clock::now() - std::chrono::floor<std::chrono::days>(std::chrono::system_clock::now())});
|
logMsg += std::format("[{:%T}] ", std::chrono::hh_mm_ss{std::chrono::system_clock::now() - std::chrono::floor<std::chrono::days>(std::chrono::system_clock::now())});
|
||||||
#else
|
#else
|
||||||
|
@ -73,7 +73,7 @@ namespace Debug {
|
||||||
if (rollingLog.size() > ROLLING_LOG_SIZE)
|
if (rollingLog.size() > ROLLING_LOG_SIZE)
|
||||||
rollingLog = rollingLog.substr(rollingLog.size() - ROLLING_LOG_SIZE);
|
rollingLog = rollingLog.substr(rollingLog.size() - ROLLING_LOG_SIZE);
|
||||||
|
|
||||||
if (!disableLogs || !*disableLogs) {
|
if (!disableLogs || !**disableLogs) {
|
||||||
// log to a file
|
// log to a file
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
ofs.open(logFile, std::ios::out | std::ios::app);
|
ofs.open(logFile, std::ios::out | std::ios::app);
|
||||||
|
|
Loading…
Reference in a new issue