[Development] QLog ( Work on qDebug and friends)
lincoln.ramsay at nokia.com
Mon Feb 20 03:25:07 CET 2012
On 02/17/2012 06:23 PM, ext David Faure wrote:
> Yes, end users don't like debug statements polluting their terminals and
> session log file. With the above reasoning, we could just keep saying "do not
> use qDebug in committed code" and the problem would be fixed. But in the
> case where developers don't follow that rule, users will appreciate an off
> switch :).
Ok... I think I'm convinced.
You can of course always drop these messages from the message handler. I
know working on Qtopia we did exactly that so that qDebugs were never
seen in "release" builds even if they were accidentally checked into the
Turning off qDebugs using the "if (!enabled); else" pattern would make
these ignored debugs cheaper so it makes sense to do that in the macro.
Where I'm a bit less clear is how the API for this would look.
Do you imagine something in the qLog config file? An environment
variable? A C++ API?
Lincoln Ramsay - Senior Software Engineer
Qt Development Frameworks, Nokia - http://qt.nokia.com/
More information about the Development