From kde-core-devel Thu Sep 13 21:03:11 2007 From: David Faure Date: Thu, 13 Sep 2007 21:03:11 +0000 To: kde-core-devel Subject: Re: [path] litte kDebug extension Message-Id: <200709132303.11673.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118971743331594 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@kde.org, sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).