On samedi 17 avril 2021 18:17:41 CEST Ted Felix wrote:
> In fact I find it annoying since it is on Every Single Line of logging.

With qDebug/qCDebug, you can decide for yourself what to see on every single 
line of logging: 
%{category} for the category, which can span more than a single file, e.g. it 
makes sense to see this as something somewhat broader (rendering, printing, 
MIDI support, etc.)
%{file} for the filename, %{line} for the line,
%{function} for the name of the function/method (requires debug mode).

All this without changing the source code, which can be just
qDebug() or qCDebug(SOME_CATEGORY).

See https://woboq.com/blog/nice-debug-output-with-qt.html

My own QT_MESSAGE_PATTERN comes from that blog, the
one described as "Time in green; blue function name for debug; red 3-frames 
backtrace for warnings; category in yellow in present" :)

> It would be really nice to have my own logging category that only I 
> would have enabled.  Then only I see my logging.  Logging is a very 
> personal thing.  Other people's logging is of limited use to me.

I see what you mean and I agree with the main point. But of course the idea 
isn't to have qCDebug(TED_FELIX), but rather to do this by feature/area/
category :)
However, if the whole code uses qCDebug(), you can turn it all off easily,
and use qDebug() for your own temporary debug messages.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5





_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to