Logs not visible when running with a non-tty output
When using the systemd service there are no logs visible, and similar can be simulated with hypridle | cat -.
My assumption is this is related to a lack of flushing in the debug helper, and when there's a tty connected there's implicit line-flushing enabled, but I'm not very familiar with how C++ stdout works. The following patch appears to fix the issue for me anyway:
diff --git a/src/helpers/Log.hpp b/src/helpers/Log.hpp
- std::cout << std::vformat(fmt, std::make_format_args(args...)) << "\n";
+ std::cout << std::vformat(fmt, std::make_format_args(args...)) << std::endl;
Same here, no output whatsoever in user-journal after startup. I'd be in favor of merging the above simple fix.
I can't merge an issue ticket. It has to be made into a mr
@Nemo157 Care to provide a PR? I'd do it, since it looks simple enough, but I have zero C++ knowledge :cry:
I'm also not familiar enough with the C++ stdlib to know if it is the correct fix.
Ah, too bad. Let's hope someone else finds this useful and picks it up.
Fixed by #88