[Development] QLog ( Work on qDebug and friends)

David Faure david.faure at kdab.com
Thu Feb 2 14:03:03 CET 2012


On Thursday 02 February 2012 14:56:49 Robin Burchell wrote:
> On Thu, Feb 2, 2012 at 2:22 PM, David Faure <david.faure at kdab.com> wrote:
> > 1) showing more information (file, line, method, process name and PID) in
> > the default message handler, probably based on env vars (easy to add now
> > that QMessageLogContext has the necessary information).
> 
> Please don't show *all* of that by default. Having it *available* is
> useful, but especially for people working on single applications,
> things like PID in the console output is completely useless spam.
> Making it *available*? Sure. KDE could have a message handler that did
> whatever they wanted, without needing kDebug.

Sure, I didn't mean that this should be on by default.

But it would be so extremely useful to set an env var at session startup and 
suddenly make sense of .xsession-errors lines like 
"QGridLayoutEngine::addItem: Cell (0, 1) already taken" which don't currently 
tell form which app they come from.

> Another thing to note is that debugging carries a performance penalty.
> You definitely don't want that compiled in in release builds

That's already handled by QT_NO_DEBUG_OUTPUT.

> and you'd still want to avoid debug in performance-critical areas, even if
> output wasn't switched on.

Yep, this still has to be done. We have a solution in KDE for that (a quick 
"is debug enabled for this area" method that then disabled everything else in 
this qdebug object if not), but nothing in Qt yet (we need support for areas 
first ;)

> Everything else in your mail gets a +3 "approved; give this guy a payrise"
> :-)

LOL, thanks, I'll forward this to my boss then :)

-- 
David Faure | david.faure at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions




More information about the Development mailing list