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

Make the loglevel persistent by moving the LOGGER table from the LOGLEVEL DB to the CONFIG DB #687

Merged
merged 23 commits into from
Oct 28, 2022

Conversation

EdenGri
Copy link
Contributor

@EdenGri EdenGri commented Sep 14, 2022

This PR needs to be merged only after the following PR: sonic-net/sonic-buildimage#11996

What I did

Add the ability to the user to save the loglevel and make it persistent to reboot.

How I did it

Move the logger tables from the LOGLEVEL DB to the CONFIG DB

How to verify it

  1. Change the orchagent loglevel (for example) -> swssloglevel -c orchagent -l DEBUG
  2. Save the loglevel -> run config save
  3. Reboot
  4. Verify that the orchagent log level is still DEBUG ->run run redis-cli -n 4 hgetall "LOGGER|orchagent"

@dprital dprital marked this pull request as draft September 14, 2022 10:29
@dprital dprital marked this pull request as ready for review September 19, 2022 11:18
common/logger.cpp Outdated Show resolved Hide resolved
common/logger.h Outdated Show resolved Hide resolved
common/loglevel.cpp Outdated Show resolved Hide resolved
common/loglevel.cpp Outdated Show resolved Hide resolved
qiluo-msft
qiluo-msft previously approved these changes Oct 6, 2022
@EdenGri EdenGri changed the title Persistent loglevel Make the loglevel persistent by moving the LOGGER table from the LOGLEVEL DB to the CONFIG DB Oct 10, 2022
@dprital
Copy link
Collaborator

dprital commented Oct 26, 2022

/azpw run

@EdenGri
Copy link
Contributor Author

EdenGri commented Oct 27, 2022

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

merging as the PR as prev approved and only build failures fixed

@liat-grozovik liat-grozovik merged commit abda263 into sonic-net:master Oct 28, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 28, 2022
Update sonic-swss-common submodule pointer to include the following:
* abda263 Make the loglevel persistent by moving the LOGGER table from the LOGLEVEL DB to the CONFIG DB ([sonic-net#687](sonic-net/sonic-swss-common#687))
* d0fdf62 Check whether a pointer created by dynamic_cast is null before using it. ([sonic-net#689](sonic-net/sonic-swss-common#689))
* 2cae742 [Fast/Warm restart] Implement helper class for waiting restart done ([sonic-net#691](sonic-net/sonic-swss-common#691))

Signed-off-by: dprital <drorp@nvidia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 30, 2022
Update sonic-swss-common submodule pointer to include the following:
* abda263 Make the loglevel persistent by moving the LOGGER table from the LOGLEVEL DB to the CONFIG DB ([sonic-net#687](sonic-net/sonic-swss-common#687))

Signed-off-by: dprital <drorp@nvidia.com>
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Oct 31, 2022
Update sonic-swss-common submodule pointer to include the following:
* abda263 Make the loglevel persistent by moving the LOGGER table from the LOGLEVEL DB to the CONFIG DB ([#687](sonic-net/sonic-swss-common#687))

Signed-off-by: dprital <drorp@nvidia.com>
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.

5 participants