Function Snpe_Util_InitializeLoggingPath¶
Defined in File SNPEUtil.h
Function Documentation¶
-
int Snpe_Util_InitializeLoggingPath(Snpe_LogLevel_t level, const char *logPath)¶
Initializes logging with the specified log level and log path. initializeLogging with level & log path, is used on non Android platforms and after successful initialization, SNPE logs are printed in std output & into log files created in the log path.
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.).
logPath – [in] of directory to store logs. If path is empty, the default path is “./Log”. For android, the log path is ignored.
- Returns
Boolean: non-zero if successful, 0 otherwise.