Ruijie Community

Title: How to set up AC&AP to save system logs to flash? [Print this page]

Author: GTAC-Sophia    Time: 2023-6-26 11:34
Title: How to set up AC&AP to save system logs to flash?
Requirements
Save the log to and print it out.
Configuration Tips
1) You can specify the name of the log file. In general, you do not need to add file name extension.
2) You can specify the size of the file. The default is 128KB, if more than, then generate multiple files to save, with increasing numbers, such as mylog_1, mylog_2, mylog_3, up to 16 files.
3) You can specify which levels of logs to save to the flash. By default, all levels 0 to 6 are saved.
4) You can configure the size of the log memory cache. The default value is 1MB. In this way, the system will save the logs that exceed the cache space to flash.
Configuration Steps
1. Save the log to flash
Ruijie#conf
Ruijie(config)#logging file flash:filename[max-file-size] [level]



filename:
Log file name. The log file name does not contain a file type suffix. The suffix of the log file is fixed to *.txt. The suffix of the configuration file is rejected.
max-file-size:
The maximum size of log files is specified, range is 131072-6291456.
level:
The severity level of a log increases gradually. Level 0 to 6 indicates log information. Level 7 indicates debug information.



Ruijie(config)#logging buffered [level]

2. How to check logs saved to the flash:

Ruijie#dir


3. How to print log information:
Ruijie#more flash:log.txt








Welcome to Ruijie Community (https://community.ruijienetworks.com/) Powered by Discuz! X3.2