wut/libraries/libwhb/include/whb/log.h
Daniel K. O. 81db8e5dd4
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
Add WUT_FORMAT_PRINTF and fix some format string bugs. (#404)
2025-05-17 22:35:56 +02:00

41 lines
512 B
C

#pragma once
#include <wut.h>
/**
* \defgroup whb_log Logger
* \ingroup whb
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*LogHandlerFn)(const char *msg);
BOOL
WHBAddLogHandler(LogHandlerFn fn);
BOOL
WHBRemoveLogHandler(LogHandlerFn fn);
BOOL
WHBLogWrite(const char *str);
BOOL
WHBLogPrint(const char *str);
BOOL
WHBLogWritef(const char *fmt, ...)
WUT_FORMAT_PRINTF(1, 2);
BOOL
WHBLogPrintf(const char *fmt, ...)
WUT_FORMAT_PRINTF(1, 2);
#ifdef __cplusplus
}
#endif
/** @} */