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

[202012][show] show logging CLI support for logs stored in tmpfs #2652

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Feb 4, 2023

Signed-off-by: Mihir Patel patelmi@microsoft.com

Backport of #2641

What I did

Enabling "show logging" CLI to show logs from tmpfs if it exists.

How I did it

Added a check in the CLI handler to see if the path "/var/log.tmpfs" exists and display the logs from this directory if it exists. In case if the path doesn't exist, logs will be displayed from "/var/log"

How to verify it

Following tests were performed:

  1. "show logging" o/p when syslog resides in "/var/log"
  2. "show logging -f" o/p when syslog resides in "/var/log"
  3. "show logging" o/p when syslog resides in "/var/log.tmpfs"
  4. "show logging -f" o/p when syslog resides in "/var/log.tmpfs"

For detailed test results, please refer to Unit-test_logging_cli.txt

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@mihirpat1 mihirpat1 marked this pull request as ready for review February 4, 2023 23:14
@mihirpat1 mihirpat1 requested a review from prgeor February 4, 2023 23:14
@prgeor prgeor merged commit a996abd into sonic-net:202012 Feb 6, 2023
@prgeor
Copy link
Contributor

prgeor commented Feb 6, 2023

@qiluo-msft Cherry pick for #2641

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.

2 participants