Open Deep Learning API
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
odla_log.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* odla_logging_func) (const char *file_name, int line, const char *func_name, odla_log_level level, const char *msg)
 Logging function type. More...
 

Enumerations

enum  odla_log_level {
  ODLA_LOG_LEVEL_OFF , ODLA_LOG_LEVEL_FATAL , ODLA_LOG_LEVEL_ERROR , ODLA_LOG_LEVEL_WARN ,
  ODLA_LOG_LEVEL_INFO , ODLA_LOG_LEVEL_DEBUG , ODLA_LOG_LEVEL_TRACE
}
 log level enum More...
 

Functions

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetLogLevel (odla_log_level level)
 Set current log level. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetLogger (odla_logging_func logger)
 Set active logger. More...
 
ODLA_API_EXPORT odla_logging_func ODLA_API_CALL odla_GetLogger ()
 Get active logger. More...
 

Detailed Description

This file defines the ODLA log related APIs.

Definition in file odla_log.h.

Typedef Documentation

◆ odla_logging_func

typedef void(* odla_logging_func) (const char *file_name, int line, const char *func_name, odla_log_level level, const char *msg)

Logging function type.

Definition at line 43 of file odla_log.h.

Enumeration Type Documentation

◆ odla_log_level

log level enum

Definition at line 32 of file odla_log.h.

32 {
33 ODLA_LOG_LEVEL_OFF,
34 ODLA_LOG_LEVEL_FATAL,
35 ODLA_LOG_LEVEL_ERROR,
36 ODLA_LOG_LEVEL_WARN,
37 ODLA_LOG_LEVEL_INFO,
38 ODLA_LOG_LEVEL_DEBUG,
39 ODLA_LOG_LEVEL_TRACE,
odla_log_level
log level enum
Definition: odla_log.h:32

Function Documentation

◆ odla_GetLogger()

ODLA_API_EXPORT odla_logging_func ODLA_API_CALL odla_GetLogger ( )

Get active logger.

Returns
function pointer to current logger

◆ odla_SetLogger()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetLogger ( odla_logging_func  logger)

Set active logger.

Parameters
loggerthe function pointer to logger
Returns
odla_status

◆ odla_SetLogLevel()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetLogLevel ( odla_log_level  level)

Set current log level.

Parameters
levelthe log level used
Returns
odla_status