PDA

View Full Version : QT Logging class



leoalvesmachado
31st May 2010, 22:23
Hi folks

Is there a logging class for QT? Something like "log4j"...

Thanks in advance

Lykurg
31st May 2010, 23:13
You can use log4cxx (http://logging.apache.org/log4cxx/index.html). Or see qInstallMsgHandler to create your own one.

leoalvesmachado
1st June 2010, 18:06
How about log4Qt (http://log4qt.sourceforge.net/)?
Is it good? does it affect the performance negatively in a noticeable way?

kumarkun
20th August 2010, 10:20
thanks a lot

Juba
1st December 2011, 15:01
No one using another class than QtDebug?
Is the state of the art use this debug funciton (qDebug, qWarning, ...) in conjunction with a custom message handler for log to file system?
I found very simple and useful this approach, but I think that a log function with message level is needed (i.e: qMessage() ).
Thanks in advance,
Stefano.

Solomon
1st December 2013, 16:18
Beginner for learning.

ChrisW67
1st December 2013, 20:16
There is some work going on to get a more capable logging system into Qt. You might need to search the dev mailing list or git repo to find it.

anda_skoa
1st December 2013, 20:30
Category logging coming in Qt 5.2
http://doc-snapshot.qt-project.org/qdoc/qloggingcategory.html

Cheers,
_