21#define ATTRIBUTE_FORMAT_PRINTF(f, s) __attribute__((format(printf, f, s)))
23#define ATTRIBUTE_FORMAT_PRINTF(f, s)
45#define LOG_LEVEL_ERROR 0
53#define LOG_LEVEL_WARNING 1
61#define LOG_LEVEL_INFO 2
69#define LOG_LEVEL_LOG 3
77#define LOG_LEVEL_DEBUG 4
85#define LOG_LEVEL_ALL 255
97void lf_print(
const char* format, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
109void lf_print_log(const
char* format, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
void void void lf_print_debug(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report an debug message on stdout with the prefix "DEBUG: " and a newline appended at the end.
void void void void void lf_print_warning(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report a warning with the prefix "WARNING: " and a newline appended at the end.
void lf_register_print_function(print_message_function_t *function, int log_level)
Register a function to display messages.
void lf_print(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report an informational message on stdout with a newline appended at the end.
void void lf_print_log(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report an log message on stdout with the prefix "LOG: " and a newline appended at the end.
void void void void void void lf_print_error_and_exit(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report an error with the prefix "ERROR: " and a newline appended at the end, then exit with the failu...
void void void void void void void lf_print_error_system_failure(const char *format,...)
Report an error and exit just like lf_print_error_and_exit(), but also print the system error message...
void print_message_function_t(const char *, va_list)
Message print function type.
Definition logging.h:174
void void void void lf_print_error(const char *format,...) ATTRIBUTE_FORMAT_PRINTF(1
Report an error with the prefix "ERROR: " and a newline appended at the end.