diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index a341f4b4..67c160bc 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -13,7 +13,19 @@ void Debug::init(std::string IS) { } void Debug::wlrLog(wlr_log_importance level, const char* fmt, va_list args) { - Debug::log(NONE, std::string("[wlr] " + std::string(fmt)).c_str(), args); + char* outputStr = nullptr; + + std::ofstream ofs; + ofs.open(logFile, std::ios::out | std::ios::app); + + vasprintf(&outputStr, fmt, args); + + std::string output = std::string(outputStr); + free(outputStr); + + ofs << "[wlr] " << output << "\n"; + + ofs.close(); } void Debug::log(LogLevel level, const char* fmt, ...) {