Log Description
The log retrieval component is designed and developed based on the CANN Software Installation Guide and CANN Log Reference.
For standard-form deployment, the retrieval logs are App logs. For details, see "Viewing App Logs" in "Viewing Logs (Ascend EP)" in CANN Log Reference. The default path is $HOME/ascend/log. You can also use the environment variable ASCEND_PROCESS_LOG_PATH to specify the log flushing path. For example:
export ASCEND_PROCESS_LOG_PATH=$HOME/xxx
You can specify any directory on which you have the read and write permissions as the log flush directory.
The log levels are DEBUG < INFO < WARNING < ERROR in ascending order. The lower the log level is, the more detailed the logs. You can set the log level by setting the ASCEND_GLOBAL_LOG_LEVEL environment variable. For example:
1 | export ASCEND_GLOBAL_LOG_LEVEL=1 |
If this parameter is not passed, the default log level is ERROR. The values of ASCEND_GLOBAL_LOG_LEVEL are as follows:
0: DEBUG
1: INFO
2: WARNING
3: ERROR
4: NULL, meaning that no log is generated.
- To use the retrieval function in containerized scenarios, App logs are stored in a container. You need to mount the log directory to the host to implement persistence. Otherwise, logs will be destroyed when the container exits.
- App logs are not aged and the number of logs increases continuously. Therefore, you need to periodically clear the directory (you can use the built-in logrotate of the system to split logs). Otherwise, the drive space may be insufficient, affecting service running.
- The management plane logs related to installation, upgrade, and uninstallation of the software package are saved in the $HOME/log/mxIndex/deployment.log file that contains the name of the login user, access address, and host name for subsequent log recording and auditing.
Parent topic: Common Operations