Rosegarden currently spams stderr with dozens of lines of warning and information messages even during normal, error-free execution. These clutter the terminal when Rosegarden is run from the commandline (ls *.rg
, rosegarden some_composition.rg
, exit ... ls
output is now scrolled off terminal screen), and go who-knows-where (eventually overflowing a buffer?) when Rosegarden is run from a "desktop environment" GUI.
Add a new --stderr
(or some other name) commandline option. If not set, Rosegarden outputs nothing to stderr/stdout except fatal errors emitted immediately before an abort/error exit. Whether set or not, all text output goes to a new Qt text viewer widget/window, not displayed by default but viewable via a new "Info" icon/button in the main window added to the existing set of "Manage MIDI Devices", "Manage Synth Plugins", etc. If --stderr
is set, text also goes to stderr/stdout as per current implementation.
Info viewer would be dismissed/"popped-down" via standard window manager UI and/or an explicit button, and would also implement a "Clear" button to erase already-viewed messages.
This user-visible feature would likely be implemented internally as modifications to the Debug.h classes and macros.
Yes. See also the discussion about category logging (feature request 492).
The RG_DEBUG logging uses
QDebug(QtDebugMsg)
which is enabled by default in debug builds. I believe it is disabled in the release version!A lot (but not all) of the debug output is suppressed with the RG_NO_DEBUG_PRINT macro.
In my opinion (almost) all of the output is for developers and not users so I think an info window is not a good idea - it will just confuse users.
The output (or at least most of it) can be suppressed with a qtlogging.ini file set using the QT_LOGGING_CONF environment variable:
.debug=false
.warning=false
*.info=false
I agree that the solution lies in fixing RG's logging. The problems with that subsystem go all the way down to the fact that RG_WARNING (which should be, as per its name, for warnings) (regardless of how they might be output or not) is used throughout the code for debugging instead of RG_DEBUG or some similar, correctly-named macro/class/method/whatever.
I disagree that (true) warnings shouldn't be accessible to users. Remember, I proposed that the info window would only be displayed on user command (button, menu, etc). For example, included in the verbose stderr text I get when running RG is the following:
The 2nd through 4th lines are the kind of debug-only output that I think we both agree doesn't belong in a release build, but I contend that the first and last lines are information that a user should be able to see when required. Just not by default, unavoidable, every time the program is run.
Thanks for the tutorial on configuring Qt logging. I didn't have any luck with:
The best results I got were from:
(
*=false
isn't any better) but even that let through the low-level "jack" debug messages along with some others, plus some even more verbose spam:For now I do
rosegarden <file.rg> >& /dev/null
which shuts up everything. But means that if something goes wrong I have to re-run without the stderr redirection to check for meaningful messages. Just like the "no warnings at all for the user" scheme, it's not a good solution.