-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.9.3
-
None
so I wanted to store all logs from QML/JavaScript in external db, so sending them over via rest api.
however, as far as I do:
#include <QLoggingCategory> #include <QMainWindow> #include <QMessageBox> #include <QOperatingSystemVersion> #include <QMessageLogContext> #include <QSysInfo> void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { qDebug() << "Something happened"; qDebug() << msg; } int main(int argc, char *argv[]) { qInstallMessageHandler(customMessageHandler); QGuiApplication app(argc, argv); ... }
and then i simply trigger anything by:
Component.onCompleted: console.log(non_declared_variable)
All works as expected on Windows:
however when build for Android then it prints NOTHING to console (Application Output).
but if I remove the handler at all, so remove the line:
qInstallMessageHandler(customMessageHandler);
then I see the error in debugger:
so why qInstallMessageHandler() does not catch them on Android?
iOS untested