Skip to content
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

Merged
merged 5 commits into from
Feb 10, 2025
Merged

Add swss::Logger to c-api #969

merged 5 commits into from
Feb 10, 2025

Conversation

yue-fred-gao
Copy link
Contributor

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

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@r12f r12f requested review from erer1243 and liuh-80 January 27, 2025 18:22
@erer1243
Copy link
Contributor

Looks good to me. CI errors seem unrelated.

@@ -0,0 +1,29 @@
#include <cstring>
Copy link
Contributor

@FengPan-Frank FengPan-Frank Feb 5, 2025

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@r12f r12f merged commit eb30bb7 into sonic-net:master Feb 10, 2025
15 checks passed
@r12f
Copy link
Contributor

r12f commented Feb 10, 2025

merged since Hua signed off and CI passed.

@yue-fred-gao yue-fred-gao deleted the logger-c-api branch February 10, 2025 18:14
r12f pushed a commit to sonic-net/sonic-dash-ha that referenced this pull request Mar 7, 2025
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants