diff --git a/src/libwhb/include/whb/log_cafe.h b/src/libwhb/include/whb/log_cafe.h new file mode 100644 index 0000000..bc40515 --- /dev/null +++ b/src/libwhb/include/whb/log_cafe.h @@ -0,0 +1,21 @@ +#pragma once +#include + +/** + * \defgroup whb_log_cafe Cafe OS System Log Output + * \ingroup whb + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL +WHBLogCafeInit(); + +#ifdef __cplusplus +} +#endif + +/** @} */ diff --git a/src/libwhb/src/log_cafe.c b/src/libwhb/src/log_cafe.c new file mode 100644 index 0000000..a1367d3 --- /dev/null +++ b/src/libwhb/src/log_cafe.c @@ -0,0 +1,15 @@ +#include +#include + +static void +cafeLogHandler(const char * msg) +{ + OSReport("%s\n", msg); +} + +BOOL +WHBLogCafeInit() +{ + WHBAddLogHandler(cafeLogHandler); + return TRUE; +}