File QnnSystemLog.h

Parent directory (include/QNN/System)

QNN System Log API component.

Definition (include/QNN/System/QnnSystemLog.h)

Detailed Description

Provides means for QNN System to output logging data.

Includes

Full File Listing

QNN System Log API component.

     Provides means for QNN System to output logging data.

Functions

Qnn_ErrorHandle_t QnnSystemLog_create(QnnLog_Callback_t callback, QnnLog_Level_t maxLogLevel, Qnn_LogHandle_t *logger)

Create a handle to a logger object.

Parameters
  • callback[in] Callback to handle system library generated logging messages. NULL indicates system library may direct log messages to the default log stream on the target platform when possible (e.g. to logcat in case of Android).

  • maxLogLevel[in] Maximum level of messages which the system library will generate.

  • logger[out] The created log handle.

Returns

Error code:

  • QNN_SUCCESS: if logging is successfully initialized.

  • QNN_COMMON_ERROR_NOT_SUPPORTED: logging is not supported.

  • QNN_LOG_ERROR_INVALID_ARGUMENT: if one or more arguments is invalid.

  • QNN_LOG_ERROR_MEM_ALLOC: for memory allocation errors.

  • QNN_LOG_ERROR_INITIALIZATION: log init failed.

Note

Use corresponding API through QnnSystemInterface_t.

Qnn_ErrorHandle_t QnnSystemLog_setLogLevel(Qnn_LogHandle_t logger, QnnLog_Level_t maxLogLevel)

A function to change the log level for the supplied log handle.

Parameters
  • logger[in] A log handle.

  • maxLogLevel[in] New maximum log level.

Returns

Error code:

  • QNN_SUCCESS: if the level is changed successfully.

  • QNN_LOG_ERROR_INVALID_ARGUMENT: if maxLogLevel is not a valid QnnLog_Level_t level.

  • QNN_LOG_ERROR_INVALID_HANDLE: logHandle is not a valid handle

Note

Use corresponding API through QnnSystemInterface_t.

Qnn_ErrorHandle_t QnnSystemLog_free(Qnn_LogHandle_t logger)

A function to free the memory associated with the log handle.

Parameters

logger[in] A log handle.

Returns

Error code:

  • QNN_SUCCESS: indicates logging is terminated.

  • QNN_LOG_ERROR_MEM_ALLOC: for memory de-allocation errors.

  • QNN_LOG_ERROR_INVALID_HANDLE: logHandle is not a valid handle

Note

Use corresponding API through QnnSystemInterface_t.