![]() |
DriveWorks SDK Reference| 0.6.67 Release |
Processes wide logger API.
Typedefs | |
typedef void(* | dwLogCallback) (dwContextHandle_t context, dwLoggerVerbosity type, const char *msg) |
Defines a user callback method called by the SDK to log the output. More... | |
Enumerations | |
enum | dwLoggerVerbosity { DW_LOG_VERBOSE = 0x0000, DW_LOG_DEBUG = 0x1000, DW_LOG_WARN = 0x2000, DW_LOG_ERROR = 0x3000 } |
Holds the verbosity level. More... | |
Functions | |
DW_API_PUBLIC dwStatus | dwLogger_initialize (dwLogCallback msgCallback) |
Creates a new logger instance. More... | |
DW_API_PUBLIC dwStatus | dwLogger_release () |
Release logger instance and free up used memory. More... | |
DW_API_PUBLIC dwStatus | dwLogger_setLogLevel (dwLoggerVerbosity verbosity) |
Sets the verbosity level of the logger instance. More... | |
typedef void(* dwLogCallback) (dwContextHandle_t context, dwLoggerVerbosity type, const char *msg) |
Defines a user callback method called by the SDK to log the output.
[in] | context | Specifies the DriveWorks context that generated this message. It can be DW_NULL_HANDLE if no context was available when the message was generated. |
[in] | type | Specifies the type of message being logged. |
[in] | msg | A pointer to the message. |
enum dwLoggerVerbosity |
DW_API_PUBLIC dwStatus dwLogger_initialize | ( | dwLogCallback | msgCallback | ) |
Creates a new logger instance.
The logger instance can then be passed to the SDK context on creation such that all log output of the SDK are passed to the provided logger instance.
[in] | msgCallback | Specifies the callback method used by the SDK to pass log messages. It must be thread-safe. |
return DW_INVALID_ARGUMENT if msgCallback is NULL.
DW_SUCCESS
DW_API_PUBLIC dwStatus dwLogger_release | ( | ) |
Release logger instance and free up used memory.
DW_API_PUBLIC dwStatus dwLogger_setLogLevel | ( | dwLoggerVerbosity | verbosity | ) |
Sets the verbosity level of the logger instance.
Any messages with higher or equal verbosity level is forwarded to the logger callback.
[in] | verbosity | Specifies the verbosity level to use. |