4 #include <twr_common.h>
12 #define TWR_LOG_UART TWR_UART_UART2
15 #ifndef TWR_LOG_BUFFER_SIZE
16 #define TWR_LOG_BUFFER_SIZE 256
19 #define TWR_LOG_DUMP_WIDTH 8
74 void twr_log_dump(
const void *buffer,
size_t length,
const char *format, ...) __attribute__ ((format (printf, 3, 4)));
80 void twr_log_debug(const
char *format, ...) __attribute__ ((format (printf, 1, 2)));
86 void twr_log_info(const
char *format, ...) __attribute__ ((format (printf, 1, 2)));
92 void twr_log_warning(const
char *format, ...) __attribute__ ((format (printf, 1, 2)));
98 void twr_log_error(const
char *format, ...) __attribute__ ((format (printf, 1, 2)));
102 #define twr_log_init(...)
103 #define twr_log_dump(...)
104 #define twr_log_debug(...)
105 #define twr_log_info(...)
106 #define twr_log_warning(...)
107 #define twr_log_error(...)
void void void void void twr_log_error(const char *format,...) __attribute__((format(printf
Log ERROR message (annotated in log as <E>)
twr_log_level_t
Log level.
void void void void twr_log_warning(const char *format,...) __attribute__((format(printf
Log WARNING message (annotated in log as <W>)
void void twr_log_debug(const char *format,...) __attribute__((format(printf
Log DEBUG message (annotated in log as <D>)
twr_log_timestamp_t
Log timestamp.
void twr_log_init(twr_log_level_t level, twr_log_timestamp_t timestamp)
Initialize logging facility.
void twr_log_dump(const void *buffer, size_t length, const char *format,...) __attribute__((format(printf
Log DUMP message (annotated in log as <X>)
void void void twr_log_info(const char *format,...) __attribute__((format(printf
Log INFO message (annotated in log as )
@ TWR_LOG_LEVEL_OFF
Logging disabled.
@ TWR_LOG_LEVEL_DUMP
Logging DUMP.
@ TWR_LOG_LEVEL_WARNING
Log level WARNING.
@ TWR_LOG_LEVEL_ERROR
Log level ERROR.
@ TWR_LOG_LEVEL_INFO
Log level INFO.
@ TWR_LOG_LEVEL_DEBUG
Log level DEBUG.
@ TWR_LOG_TIMESTAMP_OFF
Timestamp logging disabled.
@ TWR_LOG_TIMESTAMP_REL
Timestamp logging enabled (relative time format)
@ TWR_LOG_TIMESTAMP_ABS
Timestamp logging enabled (absolute time format)