AlogRecord

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

This API will be deprecated in later versions. You are advised not to use this API to prevent compatibility problems.

Records logs generated by each module.

Prototype

1
void AlogRecord(uint32_t moduleId, uint32_t logType, int32_t level, const char *fmt, ...)

Parameters

Parameter

Input/Output

Description

moduleId

Input

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

logType

Input

Type of the log. For details about the enumerated values, see Definitions of Data Types. If other values are passed, the log is regarded as a debug log.

level

Input

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

NOTE:

Debug-level run logs will not be recorded. DLOG_TYPE_RUN and DLOG_DEBUG cannot be used together.

fmt

Input

Information to be printed.

  • The API does not verify the content validity.
  • The maximum length of a single log is 1024 bytes. If the length exceeds 1024 bytes, the log will be truncated.

Returns

None

Example

AlogRecord(SLOG, DLOG_TYPE_RUN, DLOG_INFO, "test run log");