-
Notifications
You must be signed in to change notification settings - Fork 288
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
Add swss::Logger to c-api #969
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Looks good to me. CI errors seem unrelated. |
common/c-api/logger.cpp
Outdated
@@ -0,0 +1,29 @@ | |||
#include <cstring> |
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.
is cstring really needed to be included here?
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.
Indeed. I removed it. Thanks
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.
Thanks for the fix, could you sync branch to complete verification as well?
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
merged since Hua signed off and CI passed. |
### Why SONiC uses config_db to keep logger configuration, which allows changing the configuration on the fly. On the back, swss-common logger subscribes to config_db logger table and notifies the corresponding component. ### What this PR does Hook up to swss-common logger to receive configuration update. In response to the change, dynamically changing log level in rust. This PR can only be committed after sonic-net/sonic-swss-common#969
Why
We need to hook up to swss::Logger from swbusd/hamgrd in rust, which requires us to add the c-api for logger.
What this PR does
Add c-api for swss::Logger and corresponding unit test