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. In the Ascend RC scenario, this parameter is not available. If not specified, the log level of the device (deviceID = 0) is used by default. The value range of deviceID is [0, 63]. |
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.