libmango: add temporary formatted log function
This commit is contained in:
@@ -3,8 +3,17 @@
|
|||||||
|
|
||||||
#include <mango/status.h>
|
#include <mango/status.h>
|
||||||
|
|
||||||
|
#undef TRACE
|
||||||
|
|
||||||
extern kern_status_t kern_log(const char *s);
|
extern kern_status_t kern_log(const char *s);
|
||||||
|
|
||||||
|
#define kern_logf(...) \
|
||||||
|
do { \
|
||||||
|
char s[128]; \
|
||||||
|
snprintf(s, sizeof s, __VA_ARGS__); \
|
||||||
|
kern_log(s); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
#define kern_trace(...) kern_log(__VA_ARGS__)
|
#define kern_trace(...) kern_log(__VA_ARGS__)
|
||||||
#define kern_tracef(...) \
|
#define kern_tracef(...) \
|
||||||
|
|||||||
Reference in New Issue
Block a user