Log Overview
Log Types
Logs record the running process and exception information of a system and support troubleshooting in system running and program debugging during development. Logs are classified into the following types:
- System logs that record OS events on the device, including:
- System logs of the control CPU (kernel-mode logs and user-mode logs generated during system process running), which reflect the overall running status of the AI processor.
- System logs of the non-control CPU (for example, low-power component), which reflect the running status of components such as the low-power components, Task Scheduler, and ISP.
- App logs generated during AI app runtime, including:
- Logs printed by components such as AscendCL, GE, Runtime, and HCCL on the host.
- Logs printed by the AI CPU process on the device.
Replace id and pid in log file names in this document with the actual device ID and service process ID, respectively.
During program running, the maintenance and test information of the software stack is recorded in the memory. If a program runtime error occurs or a process ends, the information is flushed to a file, preventing frequent generation and recording of log files from affecting the performance. The information is stored in trace logs, which are generated independently. For details, see Viewing Trace Logs.
Log Format
A log example is as follows:
[ERROR] TEFUSION(12940,atc):2021-10-17-05:54:07.599.074 [tensor_engine/te_fusion/pywrapper.cc:33]InitPyLogger Failed to import te.platform.log_util
The log format is as follows:
[Level] ModuleName(PID,PName):DateTimeMS [FileName:LineNumber]LogContent
Field |
Description |
|---|---|
Level |
Log level Options: ERROR, WARNING, INFO, and DEBUG. |
ModuleName |
Name of the module that generates a log |
PID |
Module process ID |
PName |
Module process name |
DateTimeMS |
Time when a log is printed Format: yyyy-mm-dd-hh:mm:ss.fff.zzz (year-month-day-hour:minute:second:millisecond:microsecond) |
FileName:LineNumber |
File name and the corresponding line number that calls the log printing API |
LogContent |
Detailed log content of each module |