Patch: Colored debug

Thiago Macieira thiago at
Fri Aug 31 09:19:00 BST 2007

On Friday 31 August 2007 03:31:11 Andreas Hartmetz wrote:
> On Thursday 30 August 2007 01:07:37 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 ?
> I actually think that this is a great idea. While the text terminal is
> still the most powerful tool for some things there is no reason to pretend
> that it's still connected to a teletype (that's where "tty" comes from)
> that hammers black and white letters on paper. We should always use every
> facility available to us on the vast majority of systems, and colorful text
> is one of them. Go for it.
> Could you also make kWarning()'s (or whatever its name is) output red, bold
> or whatever? Warnings are more interesting if used correctly so they should
> stand out. If there's a warning there is a nontrivial chance that things
> are, actually, going really wrong.
> Thanks in advance :)

Mind you: the output is going through QDebug, which means it's handled by 
qt_message_output. And the output from that can be redirected by installing a 
message handler (qInstallMsgHandler).

All QtTest-based testcases have a message handler installed, so be careful 
with what you're outputting. I somehow doubt that we want ANSI colouring in 

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list