AlogCheckDebugLevel

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

This API will be deprecated in later versions. To avoid compatibility issues, you are advised not to use it.

Checks the debug log level.

Prototype

1
int32_t AlogCheckDebugLevel(uint32_t moduleId, int32_t level)

Parameters

Parameter

Input/Output

Description

moduleId

Input

Module ID. For details about the enumerated values, see Definitions of Data Types.

level

Input

Level of the log. For details about the macro definition, see Definitions of Data Types.

Returns

Check result of the debug log level:

1: The level check is successful.

0: The level check fails.

Example

if(AlogCheckDebugLevel(SLOG, DLOG_INFO) == 1) {
    AlogRecord(SLOG, DLOG_TYPE_DEBUG, DLOG_INFO, "test debug log");
}