-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FW tools logging system is broken #5684
Comments
@jleveque please have a look |
@nazariig: the Logger class in sonic_py_common defaults the minimum log level to NOTICE, however it offers a Could you explain what is inconsistent here? Have changes been made to sonic_py_common in the master branch that have not been backported to 201911? |
@jleveque let me elaborate a little bit of that:
And this adds an implicit constraint to use
Note: Also i have noticed that original logger configuration of Now regarding the backporting of |
I don't understand this:
I understand that the syslog default behavior is to log all priorities, but for the SONiC logger we chose to implement a default minimum log level of NOTICE. We can eliminate this default, if you prefer, and the developer can explicitly call Regarding |
@jleveque please have a look at this example:
It clearly shows us what would happen if syslog API will be used from two different logger instances. Regarding the |
Interesting. This was not the behavior I expected. I was not aware that syslog sets the mask on a per-process level. Would you mind drafting a PR to make the proposed changes to sonic-py-common/logger.py? |
@jleveque sure. I will take care. |
Description
FW tools logging system has been broken by recent changes, when
sonic-py-common
package has been introduced.The issue is caused by logger implementation which has several weak places:
NOTICE
level: logger.pyThe side effect is seen due to Mellanox Platform API implementation: chassis.py
logoption
FW tools update for
Azure/sonic-utilities
master/201911 is not consistent: basically logger modifications is missing for201911
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Logging is suppressed:
Logging is restored:
Output of
show version
:Attach debug file
sudo generate_dump
:The text was updated successfully, but these errors were encountered: