sonic-utilities
sonic-utilities copied to clipboard
[201911][show] show logging CLI support for logs stored in tmpfs
Signed-off-by: Mihir Patel [email protected]
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:
- "show logging" o/p when syslog resides in "/var/log"
- "show logging -f" o/p when syslog resides in "/var/log"
- "show logging" o/p when syslog resides in "/var/log.tmpfs"
- "show logging -f" o/p when syslog resides in "/var/log.tmpfs"
For detailed test results, please refer to Unit-test_logging_cli.txt