Describe the bug
When Chatterino logs debug messages, it does so using qDebug(). On my system (Arch Linux, though I assume this applies to any distro using systemd) this puts the debug messages into the system journal. After a while these messages get to be horribly spammy and waste space in the system logs. This sort of debug logging ought to be placed in a separate debug log file, stored at the user level, ideally with an option to turn off debug output entirely.
To reproduce
sudo journalctl -b | grep chatterinoChatterino version
Chatterino 2.1.7 (commit 5ad427bd6)
Operating system
Arch Linux
Additonally, I feel like many debug messages are artifacts of feature development and serve no real purpose at the current point in time.
It might make sense to purge those stray messages in a PR.
This might be caused by output of Chatterino being treated as output of another process, your file manager, session process, or what ever you used to start Chatterino.
Best mitigation I can think of (if that hypothesis is true) is that you should start Chatterino in a virtual terminal or using a shell script that redirects stdout and stderr to a file like /dev/null. So something like this should do.
#!/bin/bash
/path/to/bin/chatterino 2>/dev/null 1> /dev/null
I agree with @leon-richardt - there's definitely a lot of debug output we could get rid of.
After testing this on my system I don't get any output in systemd (Arch Linux as well btw). tested running chatterino from dmenu
Will leave the issue up as a "clean up debug output" reminder
I have seen this behavior on Arch Linux as well. The reason is that qt5-base is built with ./configure -journald, which causes Qt 5.6+ to log to journald/syslog if not attached to a terminal (more information here).
The solution: export the environment variable QT_LOGGING_TO_CONSOLE=1 to direct Qt logs to stderr in all cases instead of journald/syslog.
Is this still an issue? Doesn't happen on my Debian using 2.2.2 Stable.
Is this still an issue? Doesn't happen on my Debian using 2.2.2 Stable.
From a quick grep and look at the Debian configure flags, it does not seem like Debian builds with the -journald flag so this would likely not be an issue on Debian and many other distros.
I think a possible way to go about closing this issue would be creating a wiki entry over at Chatterino/wiki and basically copying @thekalio's comment above.
Most helpful comment
I have seen this behavior on Arch Linux as well. The reason is that qt5-base is built with
./configure -journald, which causes Qt 5.6+ to log to journald/syslog if not attached to a terminal (more information here).The solution: export the environment variable
QT_LOGGING_TO_CONSOLE=1to direct Qt logs to stderr in all cases instead of journald/syslog.