[path] litte kDebug extension

David Faure faure at kde.org
Thu Sep 13 22:03:11 BST 2007


On Thursday 13 September 2007, Thomas Zander wrote:
> On Wednesday 12 September 2007 21:36:43 Ralf Habacker wrote:
> > The use case for this functionality makes sense for KDE apps which uses
> > simply kDebug() and friend with the default area. (I have found this in
> > umbrello).
> 
> This doesn't scale well for bigger applications that have various debug areas. 
> As you are proposing an incompatible workflow that also breaks expectations 
> of people just wanting to print some debug in other peoples apps.
> 
> I suggest you have a 
> #define MY_APP_DEBUG 1234
> #define OTHER_DEBUG 5678
> 
> and use kdebug(MY_APP_DEBUG) << foo;  like calls in your code if you want to 
> make sure that is printed in its own debug area.

Yes this is the best/only solution currently.
Nobody got around implementing dynamic debug areas yet, but once we do that,
this solution will allow an easy migration (with those debug numbers becoming sort
of global vars instead of #defines).
Whereas kDebugSetDefaultArea forces one process to stick to one debug area.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list