[Solved] How to show Qt debug messages outside the debugger
-
I looked a bit for information about this topic:
"Here som general things about debugging (also to Mac)":http://doc.qt.nokia.com/4.7/debug.htmlbq. The Qt implementation of these functions prints the text to the stderr output under Unix/X11 and Mac OS X. With Windows, if it is a console application, the text is sent to console; otherwise, it is sent to the debugger. You can take over these functions by installing a message handler using qInstallMsgHandler().
So it also shows a way you can go to use "custom message handlers":http://doc.qt.nokia.com/4.7/qtglobal.html#qInstallMsgHandler
-
On Mac OS X the debug output goes to the system logger. You can read it with the Console Application (Usually in /Applications/Utilities/Console.app).
For your own logging facilities "qInstallMsgHandler()":http://doc.qt.nokia.com/latest/qtglobal.html#qInstallMsgHandler is your friend (that's the solution Gerolf mentioned).
I once wrote a small GUI that collects the qXXX() messages. I can put it in the wiki on request.
-
You can get some help using qInstallMsgHandler() from "this":http://lists.trolltech.com/qt-interest/2006-05/msg00602.html thread too.
-
-
[quote author="Volker" date="1293097794"]On Mac OS X the debug output goes to the system logger. You can read it with the Console Application (Usually in /Applications/Utilities/Console.app).
For your own logging facilities "qInstallMsgHandler()":http://doc.qt.nokia.com/latest/qtglobal.html#qInstallMsgHandler is your friend (that's the solution Gerolf mentioned).
I once wrote a small GUI that collects the qXXX() messages. I can put it in the wiki on request.[/quote]
I think it would be great if you could make your "small GUI that collects the qXXX() messages" available to everyone.
-
[quote author="Volker" date="1293097794"]On Mac OS X the debug output goes to the system logger. You can read it with the Console Application (Usually in /Applications/Utilities/Console.app).
For your own logging facilities "qInstallMsgHandler()":http://doc.qt.nokia.com/latest/qtglobal.html#qInstallMsgHandler is your friend (that's the solution Gerolf mentioned).
I once wrote a small GUI that collects the qXXX() messages. I can put it in the wiki on request.[/quote]
Yes, everyone would like such a handy tool.
-
I've added a "wiki page":http://developer.qt.nokia.com/wiki/Browser_for_QDebug_output with the source code of the QDebug Log Output Browser.
I hope it is useful for somebody and of course feel free to ask, if you have questions.
-
[quote author="Volker" date="1294011522"]I've added a "wiki page":http://developer.qt.nokia.com/wiki/Browser_for_QDebug_output with the source code of the QDebug Log Output Browser.[/quote]
Thanks Volker, fiddling with it at the moment... :-)
-
[quote author="Volker" date="1294011522"]I've added a "wiki page":http://developer.qt.nokia.com/wiki/Browser_for_QDebug_output with the source code of the QDebug Log Output Browser.
I hope it is useful for somebody and of course feel free to ask, if you have questions.[/quote]
Thank you!