Patch: Colored debug

Olivier Goffart ogoffart at kde.org
Thu Sep 6 20:08:05 BST 2007


Le jeudi 6 septembre 2007, Thiago Macieira a écrit :
> Olivier Goffart wrote:
> >Le lundi 3 septembre 2007, Thiago Macieira a écrit :
> >> Agreed, but kDebug's output is NOT a tty, ever. It's outputting to
> >> qt_message_output. That one has the capability of determining whether
> >> its output is a TTY or not.
> >>
> >> The test that Gof added for it has to go away. It's not thread-safe:
> >> you're not supposed to call qInstallMsgHandler once the program has
> >> started because that function isn't thread-safe, but
> >> QDebug/qDebug/kDebug/etc. are supposed to be.
> >
> >Ah, right, i have not thought about thread safety.
> >
> >Would it be ok to not use qt_message_output, but fprintf instead ?
>
> You also need to write the Windows code (OutputDebugString) as well as the
> calls to abort() and other interesting stuff (again, Windows-specific).
>
> Just make it not default. People can enable it with an environment
> variable. And it could be interesting to have the coloured output written
> to .xsession-errors (if you're reading it with less -R).

ok.

KDE_COLOR_DEBUG ?


-------------- 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: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070906/06a96c09/attachment.sig>


More information about the kde-core-devel mailing list