Patch: Colored debug

Allen Winter winter at
Thu Aug 30 23:42:08 BST 2007

On Wednesday 29 August 2007 7:07:37 pm Olivier Goffart wrote:
> Hi,
> I'd like to commit the attached patch.
> It does coloration of the kdebug stream as seen on the screenshot
> I think it make the debug output much more easier to read.
> Is there any objections ?   or do you want more colors ?
> The small problem I have is that I'm not 100% sure the debug will be printed 
> on stderr, since a custom QtMsgHandler could override that.
> one solution Matthias Kretz proposed is to do 
> QtMsgHandler old = qInstallMsgHandler( 0L );
> if(!old)  colored=isatty( fileno(stderr) );  
> else   qInstallMsgHandler( old );
> This is a hack, and i don't think it will be required since I don't know why a 
> KDE application could install message handler.

Personally, I like the idea.
Maybe the kdebugdialog could be extended to turn-on/turn-off colors
and also increase/decrease debug print "verbosity".


More information about the kde-core-devel mailing list