diff --git a/src/main/util/log.c b/src/main/util/log.c index 7da1d63..bd64329 100644 --- a/src/main/util/log.c +++ b/src/main/util/log.c @@ -64,6 +64,15 @@ static void log_builtin_format( } } +void log_exception_handler(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + log_builtin_format(LOG_LEVEL_FATAL, LOG_MODULE, fmt, ap); + va_end(ap); +} + void log_assert_body(const char *file, int line, const char *function) { log_impl_fatal("assert", "%s:%d: function `%s'", file, line, function); diff --git a/src/main/util/log.h b/src/main/util/log.h index 47603fa..e8a0bd0 100644 --- a/src/main/util/log.h +++ b/src/main/util/log.h @@ -66,6 +66,7 @@ enum log_level { LOG_LEVEL_MISC = 3, }; +void log_exception_handler(const char *fmt, ...); void log_assert_body(const char *file, int line, const char *function); void log_to_external( log_formatter_t misc,