diff options
| author | Alexander <51529891+Truenya@users.noreply.github.com> | 2024-06-14 13:11:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 12:11:40 +0200 |
| commit | b2590b58c51094424a9651d8df37dfab838b5bbb (patch) | |
| tree | dfd12a27cddd7b19de2eec4415630db1bd5b3c84 /src/debug/Log.cpp | |
| parent | 9cd5b3587cb1e3d42b647fa230024cd0153ea9cb (diff) | |
hyprctl: added --follow option to rolliglog (#6325)
Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
Diffstat (limited to 'src/debug/Log.cpp')
| -rw-r--r-- | src/debug/Log.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 8b82c852..7547204a 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -1,6 +1,7 @@ #include "Log.hpp" #include "../defines.hpp" #include "../Compositor.hpp" +#include "RollingLogFollow.hpp" #include <fstream> #include <iostream> @@ -73,6 +74,9 @@ void Debug::log(LogLevel level, std::string str) { if (rollingLog.size() > ROLLING_LOG_SIZE) rollingLog = rollingLog.substr(rollingLog.size() - ROLLING_LOG_SIZE); + if (RollingLogFollow::Get().IsRunning()) + RollingLogFollow::Get().AddLog(str); + if (!disableLogs || !**disableLogs) { // log to a file std::ofstream ofs; |
