Log Configuration File
This section describes how to set the log levels, log output paths, log file names, and log file sizes.
When modifying the log configuration items, follow the recommended values or value ranges described in Table 1-3. Otherwise, system exceptions may occur.
In multi-user scenarios, the configuration file can only be modified by the running user of the log process.
You can manually modify the host-side or device-side configuration file and restart the slogd process separately for the configuration to take effect. You can also run the reboot command to reboot the system for the host-side configuration file to take effect. Restarting the system for the configuration file to take effect is not supported on the device side.
slog.conf
The /var/log/npu/conf/slog/slog.conf file controls the configuration of Slog log collection. The following is a configuration example.
###Begin Config for Host/Device, modify in host/device take effect only for host/device### #note, 0:debug, 1:info, 2:warning, 3:error(default), 4:null(no output log), default(3) global_level=3 # Event Type Log Flag, 0:disable, 1:enable, default(1) enableEvent=1 # note, 0:debug, 1:info, 2:warning, 3:error, 4:null(no output log), 5:invalid(follow global_level) SLOG=5 # Slog IDEDD=5 # IDE daemon device IDEDH=5 # IDE daemon host HCCL=5 # HCCL FMK=5 # Framework HIAIENGINE=5 # Matrix DVPP=5 # DVPP RUNTIME=5 # Runtime CCE=5 # CCE HDC=5 # HDC DRV=5 # Driver MDCFUSION=5 # MDC fusion MDCLOCATION=5 # MDC location MDCPERCEPTION=5 # MDC perception MDCFSM=5 MDCCOMMON=5 MDCMONITOR=5 MDCBSWP=5 # MDC basesoftware platform MDCDEFAULT=5 # MDC UNDEFINE MDCSC=5 # MDC spatial cognition MDCPNC=5 MLL=5 DEVMM=5 # Dlog memory managent KERNEL=5 # Kernel LIBMEDIA=5 # Libmedia CCECPU=5 # ai cpu ASCENDDK=5 # AscendDK ROS=5 # ROS HCCP=5 ROCE=5 TEFUSION=5 PROFILING=5 # Profiling DP=5 # Data Preprocess APP=5 # User Application call HIAI_ENGINE_LOG TDT=5 FE=5 MD=5 MB=5 ME=5 GE=5 # Fmk MDCFUSA=5 CAMERA=5 ASCENDCL=5 TEEOS=5 BBOX=5 TBE=5 TUNE=5 ###End Config for Host/Device, modify in host/device take effect only for host/device### ###Begin Config for Host, modify in device donot take effect### # set host-xxx.log or device-xxx.log file num, range is [1, 1000], default(30) logAgentMaxFileNum=30 # set host-xxx.log or device-xxx.log file size, range is [1048576, 104857600], default(52458800) logAgentMaxFileSize=52428800 # set host-xxx.log/device-xxx.log parent file path logAgentFileDir=/var/log/npu/slog # set permission for other user, 0: support user with same group, 1: support all user permission_for_all=0 ###End Config for Host, modify in device donot take effect### ###Begin Config for Device, modify in host donot take effect### # note, 0:debug, 1:info, 2:warning, 3:error, 4:null(no output log), 5:invalid(follow global_level) TS=5 TSDUMP=5 AICPU=5 LP=5 IMU=5 IMP=5 ###End Config for Device, modify in host donot take effect###
Table 1-3 describes the configuration items.
Item |
Description |
---|---|
Modifications to the following parameters take effect on the device or host side separately. |
|
global_level |
Global log level:
|
enableEvent |
Event log enable:
|
SLOG, IDEDD, IDEDH... |
Log level of a module:
NOTE:
|
The following parameters take effect only on the host side. |
|
LogAgentMaxFileNum |
Number of log files stored on the host side. Defaults to 30. When the number of log files is greater than this value, the new log overwrites the earliest log. |
logAgentMaxFileSize |
Size of a single log file. Defaults to 50 MB. When the size of a log file is greater than this value, a new log file is generated. NOTE:
If the configured value is smaller than 1 MB, 1 MB is used by default. |
logAgentFileDir |
Log file path NOTE:
|
permission_for_all |
Whether to allow a user of a group different from the slogd running user to write logs during app execution.
|
The following parameters take effect only on the device side. |
|
TS, TSDUMP, AI CPU, LP, IMU and IMP |
Log level of a module:
NOTE:
|