Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
It seems that QMessageLogger does ignore any filter rule set with QLoggingCategory::setFilterRules(...).
We use different logging categories for different modules. Furthermore we have several methods which are called "from" multiple categories. These methods receive a QMessageLogger as argument so we may log the function, file, and line number of the caller not of the method which outputs to the QMessageLogger.
In this situation any filter rules are ignored and the output is written even if the specific category was disabled.
See the attached minimal example for a more tangible explanation of what we are going for.
It also includes a very simple workaround wrapper which considers the filter rules.