DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

The NVDIA® DriveWorks library implements simple logging, by passing a log message to a user-specified callback.

To initialize a logger instance, pass a callback method to the logger initialization. The call must occur before SDK context initialization. For more information, see Core Logger.

// initialize global logger instance to push all logs to the given callback
// log everything above WARN level, i.e. WARN and ERROR
dwContextParameters sdkParams = {};
dwVersion sdkVersion;
dwInitialize(&sdk, sdkVersion, &sdkParams);
Currently, logger is a global instance and is not bound to a specific SDK context.

A callback method that accepts log messages has the following syntax:

void myLoggerCallback(dwContextHandle_t context, dwLoggerVerbosity type, const char* msg)