This page contains changes for a test release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Logging

Logging#

AMD DBG API: Logging

Control logging. More...

Enumerations

enum  amd_dbgapi_log_level_t {
  AMD_DBGAPI_LOG_LEVEL_NONE = 0 , AMD_DBGAPI_LOG_LEVEL_FATAL_ERROR = 1 , AMD_DBGAPI_LOG_LEVEL_WARNING = 2 , AMD_DBGAPI_LOG_LEVEL_INFO = 3 ,
  AMD_DBGAPI_LOG_LEVEL_TRACE = 4 , AMD_DBGAPI_LOG_LEVEL_VERBOSE = 5
}
 The logging levels supported. More...
 

Functions

void AMD_DBGAPI amd_dbgapi_set_log_level (amd_dbgapi_log_level_t level) AMD_DBGAPI_VERSION_0_54
 Set the logging level. More...
 

Detailed Description

Control logging.

When the library is initially loaded the logging level is set to AMD_DBGAPI_LOG_LEVEL_NONE. The log level is not changed by amd_dbgapi_initialize or amd_dbgapi_finalize.

The log messages are delivered to the client using the amd_dbgapi_callbacks_s::log_message call back.

Note that logging can be helpful for debugging.

Enumeration Type Documentation

◆ amd_dbgapi_log_level_t

The logging levels supported.

Enumerator
AMD_DBGAPI_LOG_LEVEL_NONE 

Print no messages.

AMD_DBGAPI_LOG_LEVEL_FATAL_ERROR 

Print fatal error messages.

Any library function that returns the AMD_DBGAPI_STATUS_FATAL status code also logs a message with this level.

AMD_DBGAPI_LOG_LEVEL_WARNING 

Print fatal error and warning messages.

AMD_DBGAPI_LOG_LEVEL_INFO 

Print fatal error, warning, and info messages.

AMD_DBGAPI_LOG_LEVEL_TRACE 

Print fatal error, warning, info, and API tracing messages.

AMD_DBGAPI_LOG_LEVEL_VERBOSE 

Print fatal error, warning, info, API tracing, and verbose messages.

Function Documentation

◆ amd_dbgapi_set_log_level()

void AMD_DBGAPI amd_dbgapi_set_log_level ( amd_dbgapi_log_level_t  level)

Set the logging level.

Internal logging messages less than the set logging level will not be reported. If AMD_DBGAPI_LOG_LEVEL_NONE then no messages will be reported.

This function can be used even when the library is uninitialized. However, no messages will be reported until the library is initialized when the callbacks are provided.

Parameters
[in]levelThe logging level to set.
Return values
AMD_DBGAPI_STATUS_SUCCESSThe function has been executed successfully.
AMD_DBGAPI_STATUS_ERROR_INVALID_ARGUMENTlevel is invalid. The logging level is ot changed.