Log Format
This section describes the log format and the meaning of each field.
A log example is as follows:
[INFO] KERNEL(16852,sklogd):2020-08-13-10:07:33.024.642 [toolchain/log/slog/sklog/host/../src/klogd.c:251][59994.632619] pcieport 0000:80:08.0: AER: Corrected error received: 0000:82:00.0 SUBSYSTEM=pci DEVICE=+pci:0000:80:08.0
The log format is as follows:
[Level] ModuleName(PID,PName):DateTimeMS [FileName:LineNumber]LogContent
Field |
Description |
---|---|
Level |
Log level: ERROR, WARNING, INFO, DEBUG, or EVENT |
ModuleName |
Name of the module that generates the log |
PID |
Process ID |
PName |
Process name |
DateTimeMS |
Time when the log is printed, formatted as yyyy-mm-dd-hh:mm:ss.SSS |
FileName:LineNumber |
File name and the corresponding line number that calls the log printing interface |
LogContent |
Detailed log content of each module |
The log formatting character string % must be correctly used. To print %, use the %% format, which is consistent with the printf rule.
Otherwise, logs cannot be properly printed.