Skip to content

[201911][show] show logging CLI support for logs stored in tmpfs#3132

Open
mihirpat1 wants to merge 1 commit intosonic-net:201911from
mihirpat1:logging_cli_201911
Open

[201911][show] show logging CLI support for logs stored in tmpfs#3132
mihirpat1 wants to merge 1 commit intosonic-net:201911from
mihirpat1:logging_cli_201911

Conversation

@mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Jan 24, 2024

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

Backport of #2641

ADO - 16810429

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)

@mihirpat1 mihirpat1 marked this pull request as ready for review January 24, 2024 19:19
@mihirpat1 mihirpat1 requested a review from abdosi January 24, 2024 19:19
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.

1 participant