Logging system in Qt.
bogong last edited by
Usually I am using my own solution for logging, but now researching about Qt-native logging. Is in Qt logging system included? I mean not qmessagelogger, I mean full featured logging system that allow to store logs and send it if need to server? I found some of them, but all of them 3d-part libs:
- http://log4qt.sourceforge.net or https://github.com/MEONMedical/Log4Qt
There are some examples of using qmessagelogger for storing logs to file:
What is the best way to store logs and send it in current Qt?
beecksche last edited by
You can install your own message handler with qInstallMessageHandler.
With this handler you're able to catch all messages and store them where ever you want.
JonB last edited by
As @bogong says the Qt entry point to logging is
qInstallMessageHandler. However, that/Qt in-built is not going to "send it if need to server" (whatever that server might be). You/someone would have to write code for anything like that.
Taytoo last edited by
@bogong I'm in the same boat, which one did you end up using?