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

List:       kde-core-devel
Subject:    Re: kDebug idea
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-03-31 19:22:13
[Download RAW message or body]

On Sunday 31 March 2002 19:35, Simon Hausmann wrote:
> using namespace KDE::Debug;
> 
> ...
> 
> kDebug() << "bleh" << endl;
> 
> If you want to disable kDebug() (notice the missing 'd' :) instead
> just import
> 
> using namespace KDE::NoDebug;

Very nice idea. Too bad it's all or nothing, it doesn't allow to have groups
of debug output that can be enabled/disabled together, like #ifdef DEBUG_SOMETHING
allows.

Hetz wrote:
> Is there a way to add to KDE that the application in the default will be debug 
> disabled, but with a flag (--enable-debug <debuglevel>) to turn it on with 
> the binary packages so we can get a more suitable bug reports?

Yes that's already possible, simply compile normally and install a
kdebugrc file that disables all output (just like selecting the appropriate
button in kdebugdialog). However, the reason we don't recommend doing that
is that it has a performance impat. Apps will run a bit slower than if
compiled with --disable-debug. This is quite simple: either a debug statement
is completely removed by the compiler (that's what --disable-debug does)
or it's there but does nothing when deactivated - in which case it has
to find out that it's disabled, so it takes some CPU cycles to do that.
To provide efficient binary packages to the end user, we have to remove
all debug statements for real... it's not as if KDE wasn't being blamed for
its lack of speed already... :}

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
[prev in list] [next in list] [prev in thread] [next in thread] 

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