Setting Log Levels

Overview

Logs record the runtime status of the operating environment and the processing of functional processes, which serves as a way to check the system status and locate faults for maintenance personnel. The log module records logs of different levels based on the log levels set by the system to meet different system maintenance requirements.

The log levels are listed in ascending order as follows: DEBUG < INFO < WARNING < ERROR. A lower level indicates a more detailed output log.

Table 1 Log levels

Log Level

Description

0: DEBUG

Debug level. Logs at this level record the debugging information for R&D or maintenance personnel to locate faults.

1: INFO

Normal level. Logs at this level record information about proper system running.

2: WARNING

Warning level. Logs at this level record information when the system does not run in an expected state, but the running of the system is not affected.

3: ERROR

Common error level. Logs at this level record the following errors:

  • Unexpected data or event
  • Error with large-scale impacts but can be handled within a module
  • Error within a module
  • Error that slightly affects other modules, for example, a creation failure of a statistics task
  • Error that causes a calling failure
  • Incorrect service logic. The information about the error status and the possible causes is recorded.

4: NULL

NULL level. No log is generated.

The default level of debug logs is ERROR, and the log level can be changed. The levels of security logs and run logs cannot be changed.

The following describes how to set the log level. For details about related environment variables, see Environment Variables.

Ascend EP Standard Form

The app log levels can be set in a container or on a physical machine. The levels of device-side system logs cannot be set in a container.

Ascend RC Form

  • Set the app log level.
  • Set the system log level.

    Atlas 200/300/500 Inference Product : Set the global log level, module log level, and event logging through the /var/log/npu/conf/slog/slog.conf configuration file. For details, see Viewing the Log Configuration File. After the setting, restart the slogd process for the setting to take effect. For details, see Restarting Log Processes.