mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-13 09:22:38 +01:00
libwhb: Add a simplistic Cafe Log handler
This commit is contained in:
parent
c0c1faa1e9
commit
90d13e5708
21
src/libwhb/include/whb/log_cafe.h
Normal file
21
src/libwhb/include/whb/log_cafe.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <wut.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup whb_log_cafe Cafe OS System Log Output
|
||||||
|
* \ingroup whb
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
WHBLogCafeInit();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
15
src/libwhb/src/log_cafe.c
Normal file
15
src/libwhb/src/log_cafe.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <coreinit/debug.h>
|
||||||
|
#include <whb/log.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
cafeLogHandler(const char * msg)
|
||||||
|
{
|
||||||
|
OSReport("%s\n", msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
WHBLogCafeInit()
|
||||||
|
{
|
||||||
|
WHBAddLogHandler(cafeLogHandler);
|
||||||
|
return TRUE;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user