Logging Commands
| nv show system {log | debug-log} {files {file-name} | component {component-name}} {--view = follow} Displays the log file | ||
| Syntax Description | log | debug-log | Displays the log file in interactive mode , similar to LINUX “less” utility | 
| files | Displays the list of log files | |
| file-name | Displays an archived log file | |
| component | Displays the log configuration of all the system components | |
| component-name | Displays the log configuration of specific system component | |
| --view follow | Displays the last few lines of the current log file and then continues to display new lines as they come in until the user hits Ctrl+C, similar to LINUX “tail” utility. | |
| Default | N/A | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | GET https://<ip>/nvue_v1/system/log GET https://<ip>/nvue_v1/system/log/component GET https://<ip>/nvue_v1/system/log/comonenpt/{comonenpt-name} GET https://<ip>/nvue_v1/system/log/files GET https://<ip>/nvue_v1/system/log/files/{file-name} | |
| Related Commands | nv show system debug-log nv set system log component nvued level <level> | |
| Notes | ||
| nv show system {log-kind} rotation Show log rotation criteria configuration. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| Default | N/A | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | GET https://<ip>/nvue_v1/system/log/rotation | |
| Related Commands | nv set system log rotation nv set system debug-log rotation | |
| Notes | ||
| nv set system log component <component-name> level <level> nv unset system log component <component-name> level Set/unset the system component minimum priority level of messages to log | ||
| Syntax Description | component-name | The system component name: nvued, orchagent, portsyncd, sai_api_port, sai_api_switch, syncd | 
| level | The minimum priority level of messages to log: critical, debug, error, info, notice, warn | |
| Default | notice | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/log/component | |
| Related Commands | nv show system log component nv unset system log component level | |
| Notes | To get component-name run "nv show system log component" | |
| nv set system {log-kind} rotation disk-percentage <percentage> nv unset system {log-kind} rotation disk-percentage Set/unset the size of the log file to rotate based on disk size percentage. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| percentage | Percentage value: 0.001 - 100 | |
| Default | N/A | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
| Related Commands | nv show system log rotation nv show system debug-log rotation | |
| Notes | ||
| nv set system {log-kind} rotation frequency <frequency> nv unset system {log-kind} rotation frequency Set/unset the frequency of the file rotation. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| frequency | Rotation frequency: daily, weekly, monthly, yearly | |
| Default | daily | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
| Related Commands | nv show system log rotation nv show system debug-log rotation | |
| Notes | ||
| nv set system {log-kind} rotation max-number <count> nv unset system {log-kind} rotation max-number Set/unset the max number of file rotations. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| count | Number of file rotations before being removed: 0–999999 | |
| Default | 20 | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
| Related Commands | nv show system log rotation nv show system debug-log rotation | |
| Notes | ||
| nv set system {log-kind} rotation size <mebibytes> nv unset system {log-kind} rotation size Set the size of the file to be rotated. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| mebibytes | The size threshold for a file to be rotated: 0.001–3500 MiB | |
| Default | 10 | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/rotation | |
| Related Commands | nv show system log rotation nv show system debug-log rotation | |
| Notes | ||
| nv set system syslog trap <severity> nv unset system syslog trap Set the minimum log level to send the logs to remote servers. The unset form of that command resets trap to default. | ||
| Syntax Description | severity | debug | info | notice | warn | error | critical | none | 
| Default | Notice | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | PATCH https://<ip>/nvue_v1/system/syslog/trap | |
| Related Commands | nv show system log rotation | |
| Notes | ||
| nv action rotate system {log-kind} Force log file rotation. Action to trigger file rotation manually. | ||
| Syntax Description | log-kind | Log kind: log or debug-log | 
| Default | N/A | |
| History | 25.02.1884 | |
| Example | 
            
             | |
| REST API | POST https://<ip>/nvue_v1/system | |
| Related Commands | nv show system log rotation | |
| Notes | ||