-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace --controller-debug command line argument with Qt logging categories #4239
Conversation
This will be required to use it in a QLoggingCategory which has a deleted copy constructor.
I can't comment much on the code without researching the Qt APIs myself first. @uklotzde is probably the more fitting person to review this. |
Unfortunately there is no API to set the QLoggingCategory that |
The way the filter rules work confuses me.
and
do not work to hide the input messages from the controller, but
does work. 🤷 |
src/controllers/scripting/legacy/controllerscriptinterfacelegacy.h
Outdated
Show resolved
Hide resolved
Probably similar to GitHub actions expression syntax where there simple wildcard |
606cb08
to
7e43d38
Compare
The pre-commit failure is complaining about a legacy mapping script. Fixing that is beyond the scope of this PR. We cannot simply apply eslint's patches without testing with real hardware because they can break scripts. |
92aca80
to
ed02ced
Compare
I renamed DynamicLoggingCategory to RuntimeLoggingCategory. I think DynamicLoggingCategory is a bit misleading because it could be misunderstood to mean that the category name can be changed after the class is instantiated. |
ed02ced
to
72af3ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check for all trivial format strings like "%1"
that should be replaced.
d63269d
to
395b4f4
Compare
Is this a breaking API change that makes all old mappings that use |
No, there are no breaking changes for mapping scripts. I changed the |
7382c5e
to
4b9fc5a
Compare
https://github.com/mixxxdj/mixxx/blob/main/src/util/logging.cpp#L381 |
It looks like #2635 was a not working attempt to fix https://bugs.launchpad.net/mixxx/+bug/1871238 we have missed to revert. It was merged on 2020-08-04 to git7232 and we have a report that git7243 is still crashing. It was finally fixed on 2020-04-12 by mixxxdj/buildserver#86. |
Thank you for digging into that history. We should remove the misleading comment. |
I think manipulating the filter rules with the legacy |
I don't really mind, but the current state was just fine IMHO. Enable controller debug by default will puts the burden on everyone to find out how to get rid of the fast scrolling debug output when dealing with an other unrelated problem. From other projects I know that debug categories have to be enabled one by one on demand. What do others think? The alternative would be to print a message how to switch controller debugging when someone uses --controlerDebug |
Merge? |
No, it is a regression to fail if the --controlerDebug flag is set without enable or suggest the workaround. I would prefer to keep the old default behavior unchanged. This way we can also remove the log file hack introduced here. |
We do need to document new behavior, but I don't think we need to add an explanation in Mixxx for every behavior change, especially not for something that only affects developers. |
It has been replaced by categorized logging.
ac77958
to
daf74e6
Compare
It is silly that this isn't merged already. If it isn't merged soon I'm just going to close it. |
Please remember, we have the rule to not to rebase a PR under review. If a re-base is necessary please ask before. |
For my understanding we have exchanged strong arguments towards not silently removing "controllerDebug". |
I've already responded to those arguments. I'm not going to continue arguing. |
It is a shame that solving real problems continually gets obstructed by bikeshedding minor hypothetical issues. |
I second that. With this attitude development of Mixxx will stall and get stuck. |
I'd like to revive this PR. If we want to find a middle ground, I suggest we add a couple lines to the commandline parser that catches the |
This PR is still ready to merge as-is. |
I don't get really why it's such a problem to use But for me, it's also okay to merge without that. This can easily be implemented later. No reason to block this change. |
I don't get why we should add a hack for hypothetical developers who could easily use the new way. |
Because the rest of Mixxx doesn't use categorized logging yet, a |
Logging is separated into several subcategores:
controller.CONTROLLERNAME: general messages
controller.CONTROLLERNAME.input: incoming data
controller.CONTROLLERNAME.output: outgoing data
CONTROLLERNAME is the lowercase device name with non-alphanumeric
characters removed.
This allows more fine tuned control of what messages are shown
in the console. This is required for the logging output to be
useful with controllers that continually send input such as the
Native Instruments Traktor Kontrol S4 Mk3 and Gemini GMX (ping @codecat).