Qt Extended Home · Index · Classes · Headers · Overviews |
The <trace.h> header contains some useful debugging macros. More...
The <trace.h> header contains some useful debugging macros.
You use the macros in this file like this.
void MyClass::MyFunc() { TRACE(TRACE) << "MyClass::MyFunc"; otherfunc( 1 ); } void MyClass::otherfunc( int arg ) { TRACE(TRACE) << "MyClass::otherfunc" << "arg" << arg; LOG() << "Message"; }
The output looks like this.
T1 MyClass::MyFunc() T1 { T1 MyClass::otherfunc() arg 1 T1 { T1 Message T1 } T1 }
For each new thread seen, the number is incremented (eg. T2, T3, etc.).
Use this macro like qDebug() and the output will be indented.
Register the logging category to use (TRACE if CATEGORY is null). This statement must appear before calls to LOG() so that indenting happens correctly. See <qtopiadesktoplog.h> for the available categories.
Use this macro like qWarning() and the output will be indented. Note that calls to WARNING() cannot be turned off like calls to LOG().
Copyright © 2009 Nokia | Qt Extended Sync Agent Documentation |