[Interest] Logging best practice.

David Faure david.faure at kdab.com
Mon Dec 19 13:32:20 CET 2011


On Friday 09 December 2011 13:56:54 Bo Thorsen wrote:
> Den 09-12-2011 10:31, kai.koehne at nokia.com skrev:
> > Syntax could e.g. be:
> > 
> > qLog(QWidget).location(__FILE__, __LINE__)<<  "Created"<<  name;
> > 
> > (Maybe __FILE__ , __LINE__ can be automatically retrieved by yet another
> > macro? Not sure ...).
> You can only do that if qLog is a macro itself.
> 
> Alternatively, it could be done with one of my long standing christmas
> wishes: qBacktrace() :)

Hi Bo!

Here's your christmas gift, a little bit in advance :-)

http://www.davidfaure.fr/kde/qbacktrace4

-- 
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 Interest mailing list