-
-
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
Fix some log levels and reduce (debug) log spam #1690
Conversation
src/sources/metadatasourcetaglib.cpp
Outdated
<< "into file" << m_fileName | ||
<< "with type" << m_fileType; | ||
if (kLogger.debugEnabled()) { | ||
kLogger.debug() << "Exporting track metadata" |
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.
I am not sure if the file name is logged somewhere else as well. If not this one is important to identify a faulty file that might be the cause for a taglib crash.
src/sources/soundsourceproxy.cpp
Outdated
<< openMode; | ||
if (kLogger.debugEnabled()) { | ||
kLogger.debug() << "Opening file" | ||
<< getUrl().toString() |
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.
This one can be also a helper for identifying a crashing file.
I think we should keep at least the file related messages to identify a faulty file. |
Ok. I've re-enabled the two file related logs and also added comments why we decided do this. |
Thank you. Unfortunately Mac build fails
|
Well, I know that our logging code is broken in the context of plugins. It's simply not a good idea to share code with static global variables. I already noticed that the correct log level is not reflected in the plugins. It was just a matter of time until this breaks. |
Do you have a idea to fix the builds soon, or should we remove this from the 2.1.1 milestone? |
The configured log levels have to be propagated into the plugins upon initialization! This was already broken before I submitted the previous changes that finally broke the plugin build on macOS.
LGTM, Is this still [WIP]? |
No, I just wanted to await the build results. Building locally with clang on Linux worked, I was not able to reproduce the linker error. Unfortunately I had to bump the API version. This is a really ugly hack and only a partial fix. But we can't fix the whole logging with its global state variables that don't get initialized properly in the plugins. We really need to get rid of the plugins. |
OK, the CI fails unrelated. Merge? |
There is still a small chance that the Windows build might fail. Although according to my understanding this new version should at least be less broken than before ;) |
|
src/sources/soundsourcepluginapi.h
Outdated
@@ -3,6 +3,7 @@ | |||
|
|||
#define MIXXX_SOUNDSOURCEPLUGINAPI_VERSION 17 |
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.
Shouldn't this be 18?
@ninomp Thanks for the hint. Not the first time that this happened. |
Ok then let's merge it, and see what happens. |
This was one of the last 2.1.1 PRs. |
While testing I noticed that we still write too many debug logs that should only be written while debug logging is enabled explicitly.
I've divided the modifications into commits with appropriate commit messages for easy verification.