Setting Log Levels
Function
Sets log levels.
Syntax
adc --host <host_ip>:<port> [--device <deviceID>] --log '<params>'
Options
Option |
Description |
Required or Not |
---|---|---|
--host |
|
Yes |
--device |
If the host is connected to multiple devices, you can specify the device to set the log level by using --device deviceID. If not specified, the log level of the device (deviceID = 0) is used by default. NOTE:
The value range of deviceID is [0, 7]. Devices 0–3 share the same log configuration file, and devices 4–7 share the same log configuration file. In this way, changing the log level of any device (for example device 0) will change that of other devices (for example devices 1–3). This rule also applies to devices 4–7. |
Not |
--log |
params includes the following items:
|
Yes |
Example
- Prepare the environment by referring to Environment Preparation.
- Log in to the server installed with Toolkit as the running user.
- Run the following commands to set the log level and obtain log files:
adc --host xx.xx.xx.xx:22118 --log 'SetLogLevel(0)[error]' adc --host xx.xx.xx.xx:22118 --log 'SetLogLevel(1)[FMK:error]' adc --host xx.xx.xx.xx:22118 --log 'SetLogLevel(2)[enable]' adc --host xx.xx.xx.xx:22118 --log 'SyncLogFile:/home/HwHiAiUser/host-0_20190106002326014.log'
- Replace xx.xx.xx.xx with the actual IP address of the host.
- The value of moduleName can be obtained from the configuration file /var/log/npu/conf/slog/slog.conf on the host.
- For details about the log principles, log files, path of the log files, and other methods to set log levels, see Log Reference.