Function Snpe_Util_InitializeLogging

Function Documentation

int Snpe_Util_InitializeLogging(Snpe_LogLevel_t level)

Initializes logging with the specified log level. initializeLogging with level, is used on Android platforms and after successful initialization, SNPE logs are printed in android logcat logs.

It is recommended to initializeLogging before creating any SNPE instances, in order to capture information related to core initialization. If this is called again after first time initialization, subsequent calls are ignored. Also, Logging can be re-initialized after a call to terminateLogging API by calling initializeLogging again.

A typical usage of Logging life cycle can be initializeLogging() any other SNPE API like isRuntimeAvailable()

  • setLogLevel() - optional - can be called anytime between initializeLogging & terminateLogging SNPE instance creation, inference, destroy terminateLogging().

Please note, enabling logging can have performance impact.

Parameters

level[in] Log level (LOG_INFO, LOG_WARN, etc.).

Returns

Boolean: non-zero if successful, 0 otherwise.