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

List:       kde-core-devel
Subject:    Re: Patch: Colored debug
From:       Allen Winter <winter () kde ! org>
Date:       2007-08-30 22:42:08
Message-ID: 200708301842.08148.winter () kde ! org
[Download RAW message or body]

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
> http://bepointbe.be/files/tmp/kdebug1.png
> 
> 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".

-Allen
[prev in list] [next in list] [prev in thread] [next in thread] 

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