Updated on 2022-03-13 GMT+08:00

Setting Log Levels

Function

Sets the log levels for the host and device.

Syntax

IDE-daemon-client --host <host_ip>:<port> [--device <deviceID>] --log '<params>'

Parameter

Table 1 Parameter description

Parameter

Description

Mandatory or Not

Default Value

--host

  • host_ip: specifies the IP address of the host.
  • port: specifies the port number.

Yes

The default value of port is 22118.

--device

If the host is connected to multiple devices, you can specify a device by using --device deviceID. If the device is not specified, the device with deviceID of 0 is used by default.

No

The default value of deviceID is 0.

--log

params includes the following items:

  • SetLogLevel: sets the global log level. The value 0 indicates the global log level, the value 1 indicates the module-level log level, and the value 2 indicates the event log level. When the event log level is set, enable indicates that the event log level is enabled, and disable indicates that the event log level is disabled.
  • SetLogLevel[Module name:Level]: sets the log level of a specified module.
    • Level: error, info, warning, debug, null (null indicates that no log is recorded.)
    • Module name: dlog, slog, cce, and other values

Yes

-

Example

  1. Log in to the server on the host as the HwHiAiUser user.
  2. Run the following commands to set the log level for the host and device:
    IDE-daemon-client --host xx.xx.xx.xx:22118 --log 'SetLogLevel(0)[error]'
    IDE-daemon-client --host xx.xx.xx.xx:22118 --log 'SetLogLevel(1)[slog:error]'
    IDE-daemon-client --host xx.xx.xx.xx:22118 --log 'SetLogLevel(2)[enable]'
    • Replace xx.xx.xx.xx with the actual IP address of the host.
    • The value of Module name is defined in the enumerated format. The options are as follows:

      enum {

      DLOG = 0, // Dlog

      SLOG, // Slog

      IDEDD, // IDE daemon device

      IDEDH, // IDE daemon host

      LOGAGTH, // log agent host

      HCCL, // HCCL

      FMK, // Framework

      HIAIENGINE, // Matrix

      DVPP, // DVPP

      RUNTIME, // Runtime

      CCE, // CCE

      #if (OS_TYPE == LINUX)

      HDC, // HDC

      #else

      HDCL, // HDCL windows has a def with the same name HDC, so change HDC to HDCL

      #endif

      DRV, // Driver

      MDCCONTROL, // Mdc control

      MDCFUSION, // Mdc fusion

      MDCLOCATION, // Mdc location

      MDCPERCEPTION, // Mdc perception

      MDCMOP,

      MDCFSM,

      MDCCOMMON,

      MDCMONITOR,

      MDCBSWP, // MDC basesoftware platform

      MDCDEFAULT, // MDC UNDEFINE

      MDCSC, // MDC spatial cognition

      MDCBP,

      MDCTF,

      MLL,

      DEVMM, // Dlog memory managent

      KERNEL, // Kernel

      MDCSMCMD, // sm_control_cmd

      MDCSCREEN, // parking_spot_screen

      LIBMEDIA, // Libmedia

      CCECPU, // ai cpu

      ASCENDDK, // AscendDK

      ROS, // ROS

      HCCP,

      RoCE,

      TEFUSION,

      PROFILING, // Profiling

      DP, // Data Preprocess

      APP, // User Application call HIAI_ENGINE_LOG

      INVLID_MOUDLE_ID

      };