> On 4/17/21 11:40 AM, Chris Cannam wrote: >> Can anyone recall why we introduced the RG_DEBUG macros in the first >> place? > > Location and filtering as David said. Then Tom Breton took it to the > next level and added a file-by-file prefix to the logging messages (the > current RG_MODULE_STRING). Later on I added RG_WARNING to replace all > the legitimate use of cerr for warnings to help the user.
I know I haven't posted in ages. tl;rd: Switching to QLoggingCategory sounds reasonable to me. About RG_MODULE_STRING: We were seeing a deluge of output with no good way to relate it to source - either "Where are the outputs from the one or two files I'm looking for in this mess?" or "I think this line is relevant but where does it come from?". IIRC we already had a few files that said their names in the output, but irregularly, so I replaced that with a unified mechanism. IIRC that's where "[generic]" comes from - there was already some fallback calling certain strings "[generic]" and I didn't want to upset that in case anybody depended on it. I wanted to conservatively work with the existing debug stream mechanism. IIRC that mechanism does a macro trick to turn debugging on/off where the debug stream is defined differently depending on a compile flag, so individual files can't assume the debug stream is inherited from QTextStream (Was that it?) because it might instead be a dummy class of the same name. Or something like that. That's why it works like it does. As I said, no problem moving to a more precise mechanism. And good work, Ted. Tom Breton _______________________________________________ Rosegarden-devel mailing list Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel