The logging functionality that allows for logging messages at different log levels.
More...
|
void | ca_log (ca_loglevel loglevel, const char *format, va_list argp) |
| Function to process logs depending on platform. More...
|
|
STATIC void | ca_log_crit (const char *format,...) |
| Print a log message with log level CRIT (Will always be displayed) More...
|
|
STATIC void | ca_log_warn (const char *format,...) |
| Print a log message with log level WARN (Will be displayed if log level is equal or higher, see ca_loglevel) More...
|
|
STATIC void | ca_log_note (const char *format,...) |
| Print a log message with log level NOTE (Will be displayed if log level is equal or higher, see ca_loglevel) More...
|
|
STATIC void | ca_log_info (const char *format,...) |
| Print a log message with log level INFO (Will be displayed if log level is equal or higher, see ca_loglevel) More...
|
|
STATIC void | ca_log_debg (const char *format,...) |
| Print a log message with log level DEBG (Will be displayed if log level is equal or higher, see ca_loglevel) More...
|
|
The logging functionality that allows for logging messages at different log levels.
They can also be disabled using CMake cache variable CASCODA_LOG_LEVEL.
◆ CA821X_API_INCLUDE_CA821X_LOG_H_
#define CA821X_API_INCLUDE_CA821X_LOG_H_ |
◆ ca_loglevel
◆ ca_loglevel
Cascoda loglevel type.
Enumerator |
---|
CA_LOGLEVEL_CRIT | Critical warnings that should always be displayed.
|
CA_LOGLEVEL_WARN | Warnings that something has gone wrong.
|
CA_LOGLEVEL_NOTE | Low-frequency notes that may be of interest.
|
CA_LOGLEVEL_INFO | Semi-Regular information that may be more frequent.
|
CA_LOGLEVEL_DEBG | High Frequency debug logs, data dumps, or unimportant information.
|
◆ ca_log()
void ca_log |
( |
ca_loglevel |
loglevel, |
|
|
const char * |
format, |
|
|
va_list |
argp |
|
) |
| |
Function to process logs depending on platform.
This function should not be used by applications, and the ca_log_crit, ca_log_warn etc functions should be used instead.
- Parameters
-
loglevel | The ca_loglevel log level. |
format | A pointer to the format string. |
argp | Arguments for the format specification. |
◆ ca_log_crit()
STATIC void ca_log_crit |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Print a log message with log level CRIT (Will always be displayed)
- Parameters
-
format | printf-style format string, followed by printf-style arguments |
◆ ca_log_debg()
STATIC void ca_log_debg |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Print a log message with log level DEBG (Will be displayed if log level is equal or higher, see ca_loglevel)
- Parameters
-
format | printf-style format string, followed by printf-style arguments |
◆ ca_log_info()
STATIC void ca_log_info |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Print a log message with log level INFO (Will be displayed if log level is equal or higher, see ca_loglevel)
- Parameters
-
format | printf-style format string, followed by printf-style arguments |
◆ ca_log_note()
STATIC void ca_log_note |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Print a log message with log level NOTE (Will be displayed if log level is equal or higher, see ca_loglevel)
- Parameters
-
format | printf-style format string, followed by printf-style arguments |
◆ ca_log_warn()
STATIC void ca_log_warn |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Print a log message with log level WARN (Will be displayed if log level is equal or higher, see ca_loglevel)
- Parameters
-
format | printf-style format string, followed by printf-style arguments |