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 adjusted. The default level of security logs is DEBUG, and that of run logs is INFO, but the log levels cannot be adjusted.

The following describes how to set the log level..

Setting App Log Level

Setting System Log Level

Ascend EP : Use the msnpureport tool. For details, see the msnpureport Instructions.

Ascend RC : For the Atlas 200I/500 A2 inference products , set the global log level, module log level, and event logging through the /etc/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.