Defines a logging category in QML. More...
Import Statement: | import QtQml 2.11 |
Since: | Qt 5.8 |
A logging category can be passed to console.log() and friends as the first argument. If supplied to to the logger the LoggingCategory's name will be used as Logging Category otherwise the default logging category will be used.
import QtQuick 2.8 Item { LoggingCategory { id: category name: "com.qt.category" } Component.onCompleted: { console.log(category, "message"); } }
Note: As the creation of objects is expensive, it is encouraged to put the needed LoggingCategory definitions into a singleton and import this where needed.
See also QLoggingCategory.
name : string |
Holds the name of the logging category.
Note: This property needs to be set when declaring the LoggingCategory and cannot be changed later.
See also QLoggingCategory::categoryName().
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: