-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Make log level for VCPs configurable #3126
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
Conversation
In INI file with [DISPLAY] VCP_LOGLEVEL = <log_level> With <log_level> = one of DEBUG, INFO, WARNING, ERROR, CRITICAL
To reduce the number of default log outputs and to be consistent with the other instances of the logger.
|
I don't think we need to add another ini log level setting. Gmccapy and glavevcp should set the level with there own debug switches. Gladevcp and Qtvcp should not complain about INI settings if no INI has been given. Maybe we could get our heads together and decide on common ini requirements rather then each GUI having it's own similar one. |
|
Thanks for your feedback.
Yes without
I currently get this mass of log messages because I have some VCPs integrated:
Sounds good 👍 |
|
Remind me .. integrated vcps require a separate gladevcp Instance (embedded) or does gmoccapy integrate the gladevcp directly into gmoccapy's instance? |
One gladevcp instance is embedded in gmoccapy - you get that even without VCPs
No, gladevcp doesn't have that option. Only qtvcp has this. |
|
This level of output does seem excessive, but on the other hand it's potentially useful info, hinting that the integrator really ought to have put some data in the INI. I am guessing we don't have an "INFO" level? "WARNING" seems a little too serious for these. |
|
[Andy]
Yes we have but I think WARNING is ok as we also have ERROR and CRITICAL above. [Chris]
I think it's a good solution together with #2335 Expect that I still get those lines, one for every loaded VCP: |
We should make |
Can you push that to master or make a pull request? |
|
Where are we with this? Is the suggestion in the link above something to merge instead of this PR, or in addition to this PR? |
That commit resolves my issue to 90%, so yes instead |
Pushed this to master now. As for the multiple: First do you think it would be better to log to different files (maybe by adding the gladevcp object name) for each gladevcp instance? |
Not really as we usually don't have a logger in the VCPs. For me the log file only contains
So I think it's safe to disable/remove logging for that. |
Currently in gmocappy you get a lot of warnings from the logger of the QT_ISTAT instances which are not relevant for gmoccapy.
The more VCPs you are using the more (non-relevant) log messages you get, which makes it hard to focus on the real debug messages you want to see.
So I looked for a way to suppress these warnings.
I added an INI setting which can control this:
VCP_LOGLEVEL = ERRORI am open for other suggestions...
Furthermore I set the default level of the logger itself to WARNING like the default value of all the others which are using the logger.