[Interest] Logging best practice.

Bo Thorsen bo at fioniasoftware.dk
Fri Dec 9 13:56:54 CET 2011


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() :)

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk



More information about the Interest mailing list