Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Categorized logging from QML

$
0
0
Hello, I am interested in using the categorized logging functionality (http://qt-project.org/doc/qt-5/qloggingcategory.html#installFilter) from QML. After installing a message handler, I have noticed that messages logged from QML using console.log(), console.warn() and console.error() have their category set to “qml”. “qml” is very general, especially in a large QML-based project. Ideally I would like to use the logging categories from QML that I have defined in C++ using Q_LOGGING_CATEGORY/Q_DECLARE_LOGGING_CATEGORY, something conceptually equivalent to console.log(MY_CATEGORY, “This is a message for the MY_CATEGORY category defined in C++) Is something like this possible? The documentation doesn’t mention anything about QML. It would be really useful to have the log category filtering capabilities to be able to filter QML log messages too…

Viewing all articles
Browse latest Browse all 4972

Trending Articles