static void log_assert(int level, const char *text, const char *file, int line, const char *func, const char *format) {
static char buffer[LINE_MAX];
+ if (_likely_(LOG_PRI(level) > log_max_level))
+ return;
+
snprintf(buffer, sizeof(buffer), format, text, file, line, func);
char_array_0(buffer);
}
void log_assert_failed_return(const char *text, const char *file, int line, const char *func) {
+ PROTECT_ERRNO;
log_assert(LOG_DEBUG, text, file, line, func, "Assertion '%s' failed at %s:%u, function %s(). Ignoring.");
}