ACU6 Device API
log.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Actia Nordic AB. All rights reserved.
7 #ifndef LIBS_ACTIA_INCLUDE_LOG_H_
8 #define LIBS_ACTIA_INCLUDE_LOG_H_
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include <stdarg.h>
15 
17 typedef enum {
28 } a_log_level;
29 
38 typedef void (*a_log_function)(a_log_level level, const char *format, va_list ap);
39 
54 
61 void a_log_syslog_logger(a_log_level level, const char *format, va_list ap);
62 
69 void a_log_stdout_logger(a_log_level level, const char *format, va_list ap);
70 
77 void a_log_stderr_logger(a_log_level level, const char *format, va_list ap);
78 
79 /* End of log group */
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif // LIBS_ACTIA_INCLUDE_LOG_H_
void a_log_set_logger(a_log_function function)
Set Actia library logging function.
void a_log_stdout_logger(a_log_level level, const char *format, va_list ap)
Standard output logger.
void(* a_log_function)(a_log_level level, const char *format, va_list ap)
Logger function prototype.
Definition: log.h:38
void a_log_stderr_logger(a_log_level level, const char *format, va_list ap)
Standard error logger.
a_log_level
Actia library log levels.
Definition: log.h:17
void a_log_syslog_logger(a_log_level level, const char *format, va_list ap)
Syslog logger.
@ A_LOG_INFO
Ordinary event.
Definition: log.h:21
@ A_LOG_WARNING
Ordinary event, but not quite expected (e.g.
Definition: log.h:23
@ A_LOG_FATAL
Extreme event.
Definition: log.h:27
@ A_LOG_DEBUG
Debug info.
Definition: log.h:19
@ A_LOG_ERROR
Extraordinary event.
Definition: log.h:25