added readWholeFile and more generic tracelog with va_list
This commit is contained in:
parent
4cc2159793
commit
aa39e2563d
4 changed files with 88 additions and 10 deletions
10
tracelog.h
10
tracelog.h
|
|
@ -11,15 +11,17 @@ extern "C" {
|
|||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LogAll, LogTrace, LogDebug, LogInfo, LogWarning, LogError, LogFatal
|
||||
} LogLevel;
|
||||
};
|
||||
|
||||
void traceLog(LogLevel level, const char *fmt, ...);
|
||||
void traceLog(int level, const char *fmt, ...);
|
||||
void traceLogVaList(int level, const char *fmt, va_list args);
|
||||
void traceUseNewline(bool use_newline);
|
||||
|
||||
#define tall(...) traceLog(LogAll, __VA_ARGS__)
|
||||
#define tall(...) traceLog(LogAll, __VA_ARGS__)
|
||||
#define trace(...) traceLog(LogTrace, __VA_ARGS__)
|
||||
#define debug(...) traceLog(LogDebug, __VA_ARGS__)
|
||||
#define info(...) traceLog(LogInfo, __VA_ARGS__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue