[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [path] litte kDebug extension
From:       David Faure <faure () kde ! org>
Date:       2007-09-13 21:03:11
Message-ID: 200709132303.11673.faure () kde ! org
[Download RAW message or body]

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).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic