Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Logging library for Qt
artem.marchenko last edited by
I am quite new to Qt and I am looking for a logging library.
Something that would have several priorities to be enabled, disabled (errors, warnings, infos), could print to console or file and ideally have a set of macros that would automagically add classname and method name to the log file.
I tried googling around, managed to find mentions of Log4Qt and QxtLogger, but somehow not much activity around them and surprising amount of messages on just using qInstallMsgHandler() and creating a custom logger just for yourself.
What would be a supported logging library to study closer?
Or is everybody really creating his own logger and that's it?
AcerExtensa last edited by
Why do you need any logging libraries? Qt has great and simple logging possibilities...
Using qDebug(), qWarning() & qCritical() with implemented MsgHandler function can do everything what you need and it's done in 5 minutes...
andre last edited by
QxtLogger works just fine. There is also work going on in Qt itself to make more detailed logging possible, but that will be for Qt5.
Scylla last edited by
Or take a look at "this":http://developer.qt.nokia.com/forums/viewthread/2654 .