Logging functions
- group log
Actia library log control
Typedefs
-
typedef void (*a_log_function)(a_log_level level, const char *format, va_list ap)
Logger function prototype.
For use with a_log_set_logger().
- Param level:
The log level of the message
- Param format:
printf-style format string- Param ap:
printfarguments
Enums
-
enum a_log_level
Actia library log levels
Values:
-
enumerator A_LOG_DEBUG
Debug info
-
enumerator A_LOG_INFO
Ordinary event
-
enumerator A_LOG_WARNING
Ordinary event, but not quite expected (e.g. bad frame)
-
enumerator A_LOG_ERROR
Extraordinary event.
-
enumerator A_LOG_FATAL
Extreme event. Application will abort immediately.
-
enumerator A_LOG_DEBUG
Functions
-
void a_log_set_logger(a_log_function function)
Set Actia library logging function.
All Actia library log messages will invoke this function to log messages.
Note: This setting only affects logs for the instance of the Actia library in the current application. Device system logs are not affected.
Logs are sent to syslog by default ( a_log_syslog_logger() ).
The built-in logger functions are named
a_log_*_logger().- Parameters:
function – Function that will be called for each log message
-
void a_log_syslog_logger(a_log_level level, const char *format, va_list ap)
Syslog logger.
Sends all messages to the syslog, mapping the log level.
See also
-
void a_log_stdout_logger(a_log_level level, const char *format, va_list ap)
Standard output logger.
Sends all messages to standard output (stdout), prefixed with the log level.
See also
-
void a_log_stderr_logger(a_log_level level, const char *format, va_list ap)
Standard error logger.
Sends all messages to standard error (stderr), prefixed with the log level.
See also
-
typedef void (*a_log_function)(a_log_level level, const char *format, va_list ap)